Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on D is being used for autonomous driving research – Audi and Mercedes. Parent comment
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.
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.