3 ms·
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 Re
by ShroudedNight 1y 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.
- ambicapter 1y ago> 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
- ShroudedNight 1y agoI did, however that call out did, admittedly, slip past me
- ambicapter 1y agoNo worries, I felt like an ass using the idiom but it was so literally appropriate.