5 ms·
It's always kinda humbling to see how much performance is still left on the table in some base/core libraries everyone uses. It'd be nice to have seen what the
by geokon 9y ago
It's always kinda humbling to see how much performance is still left on the table in some base/core libraries everyone uses. It'd be nice to have seen what the compiler output is in comparison - and explore if there is a way to reorganize the code to "coerce" the compiler to output something similar.
The few times I've had to do similar things - I usually work by tweaking the code to give me the desired compiler output and I really try to avoid inline assembly. This usually helps me learn some limitations of C/C++ and what the compiler can deduce
- praulv 9y agogodbolt? edit: curious as to how you perform this optimisation.
- geokon 9y agoIt's been a few years since I've had to do it - but back then I just used the Visual Studio disassembly. You can get something similar (but more messy) with objdump. Godbolt seems like a good solution now-a-days, but you still need to run benchmarks