Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
infiniteburp
on March 17, 2012
|
parent
|
context
|
favorite
| on:
Sorting in C++: 3 times faster than C
Loop unroll for limit branching. You can sort what's in cache, then load a new chunk of data into cached and sort it ... then merge the sorted chunks.
Someone
on March 17, 2012
[–]
Sometimes, you can also get rid of branches by using arithmetic. For example, see
http://stackoverflow.com/questions/1610836/branchless-code-t...
or google "Branchless coding".
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: