|
|
|
|
|
by hayfield
4532 days ago
|
|
Some work I was doing over the summer indicates that the optimal datatype depends on the algorithm you're using. qsort() can get 15% better performance with uint64_ts than uint32_ts (sorting identical arrays of 8 bit numbers represented differently).
On the other hand, a naive bubble sort implementation was managing 5% better performance with 16 bit datatypes over any of the others. If you start measuring energy usage as well, it becomes even stranger - using a different datatype can make it run 5% faster, while using 10%+ less energy (or in the qsort() case, take less time, but use more energy). |
|