News for hackers. Stuff that matters.
Re:D is being used for autonomous driving research – Audi an... by jstimpfle on Wednesday June 26, 2019 @04:25AM (#20282935)
2x is only for integers, of course. Often you'll have bigger structs to sort.

But anyway. If performance matters (it mostly doesn't; sorting is usually not a bottleneck), you can reap much more than 2x by various tricks

- Improve the data by adding easier to compare fields

- tailor sorting algorithm to the data (what machine types? can we optimize with CPU-specific assembly? Can we do radix sort?, etc)

- avoid the need for sorting altogether. Often, the data can be constructed in a better way such that it falls out sorted.

There are no comments on this comment yet.