Hacker News new | ask | show | jobs
by ShroudedNight 263 days ago
Was this compiled at O0? The generated code looks unnecessarily long-winded - at the very least I would expect the match jump table to get culled to only the Relaxed implementation.
1 comments

> Note we did not ask rustc to optimize the code. If we did, the compiler would generate more efficient assembly: No spills to the stack, fewer jumps, no dispatch on memory ordering, etc. But I wanted to keep the output as close to the original IR as possible to make it easier to follow.

RTFA

I did, however that call out did, admittedly, slip past me
No worries, I felt like an ass using the idiom but it was so literally appropriate.