Re:No nuances, just buggy code (was: related to Spinlock imp...
by cycloptic on Sunday January 05, 2020 @03:50PM
(#21963983)
There's no excuses, the behavior of the scheduler is documented and straightforward. Up thread a twitter user [0] noted that you can somewhat replicate the behavior of windows by replacing sched_yield() with sleep(0). The original benchmark skips this detail and just assumes the C++ wrapper will exhibit the same behavior on all OSes with all schedulers, which is clearly wrong.
[0]: https://nitter.net/dotstdy/status/1213582199615901696#m