Timeline for Generic QuickSort with Performance Optimised Swap for small types
Current License: CC BY-SA 4.0
16 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 1, 2021 at 4:05 | history | edited | Jamal |
edited tags
|
|
Dec 30, 2020 at 12:50 | comment | added | Oliver Schönrock |
I used gcc-9 and clang-10 on ubuntu 20.04 with -O3 . I suspect they used the same underlying libc implementation of memcpy() .
|
|
Dec 30, 2020 at 12:48 | comment | added | Toby Speight |
How many platforms' implementations of memcpy() did you profile to determine that it always performs weakly with small count? You're probably reimplementing something that the better compilers are already doing for you (remember that memcpy() may be inlined by the compiler, so it likely depends on the optimisation level you ask for, too).
|
|
Dec 30, 2020 at 12:46 | comment | added | Oliver Schönrock | Yes, that's true, and I did fix the seed while debugging. But I opened it to generate any possible unforseen edge cases. | |
Dec 30, 2020 at 12:45 | comment | added | Toby Speight | There shouldn't be anything random in here anyway - sorting should be completely deterministic, and tests need to be reproducible (nothing worse than tests that sometimes pass and sometimes fail - how do you debug that?) At least print the seed used, and allow that to be passed in to reproduce the test. | |
Dec 29, 2020 at 23:57 | history | edited | Linny | CC BY-SA 4.0 |
added 2 characters in body
|
Dec 29, 2020 at 23:02 | comment | added | Oliver Schönrock | @1201ProgramAlarm Thanks, valid point. It's (2^31)-1, ie ~ 2Billion on my machine, and I wasn't really focused on uniform distribution etc. But fair point. | |
Dec 29, 2020 at 22:57 | answer | added | Loki Astari | timeline score: 2 | |
Dec 29, 2020 at 22:41 | history | edited | Oliver Schönrock | CC BY-SA 4.0 |
added 500 characters in body
|
Dec 29, 2020 at 22:36 | history | edited | Oliver Schönrock | CC BY-SA 4.0 |
added 500 characters in body
|
Dec 29, 2020 at 22:01 | history | edited | Oliver Schönrock | CC BY-SA 4.0 |
added 22 characters in body
|
Dec 29, 2020 at 21:51 | history | edited | Oliver Schönrock | CC BY-SA 4.0 |
deleted 4 characters in body
|
Dec 29, 2020 at 21:00 | comment | added | 1201ProgramAlarm |
If your rand only returns 15 or 16 bits (which is common) your random ranges won't cover the full range.
|
|
Dec 29, 2020 at 20:44 | history | edited | Oliver Schönrock | CC BY-SA 4.0 |
added 147 characters in body
|
Dec 29, 2020 at 20:38 | history | edited | Oliver Schönrock | CC BY-SA 4.0 |
added 12 characters in body
|
Dec 29, 2020 at 20:33 | history | asked | Oliver Schönrock | CC BY-SA 4.0 |