Settings

Theme

Show HN: Avoiding "if" makes Quicksort faster

easylang.online

3 points by chrka a month ago · 4 comments

Reader

jjgreen a month ago

In line 423 or the optimised code there's a typo: "sort2(e,i)" should be "sort2(i,e)"

anticleiades a month ago

branch-less programming is a fascinating area. you have used -O3. Possibly, the compiler is also vectorizing some parts of the code. I am curious to know the contribution of AVX/SIMD to the speed-up (i.e, how much speed-up avoiding branches "alone" yields)

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection