Viewing profile — zhangxp1998
zhangxp1998
HN member- Joined
- Mon, Nov 25, 2019, 4:45 PM UTC
- HN karma
- 29
- Public activity
- 7 items
- HN profile
- View on Hacker News ↗
About zhangxp1998
No profile information was provided.
Recent public activity
-
comment
Comment #22327013
It's just quick sort with insertion sort for small base cases.
-
comment
Comment #22326993
" It begins with quicksort, it switches to heapsort when the recursion depth exceeds a level based on (the logarithm of) the number of elements being sorted and it switches to inse…
-
comment
Comment #22326664
I agree is unfair. The point of my benchmark was that the OP's claim "quad sort is faster than quicksort" is false.
-
comment
Comment #22326633
I looked at disassembly of generated binary, sure, function calls inside quad sort were also inlined.
-
comment
Comment #22323500
See https://gist.github.com/zhangxp1998/0e2fa30656c894017d183e0d... for a comparison of quadsort with C++'s std::sort. The compare functions are inlined.
-
comment
Comment #22323319
qsort has to invoke your comparison function repeatedly, which incurs a lot of overhead. Try C++'s std::sort
-
comment
Comment #21629935
Okay, so you are comparing single-threaded GNU wc with your multi-threaded Go implementation? That's fair.