News for hackers. Stuff that matters.
Re:Can you trust a compiler to optimize your code? by bick_nyers on Tuesday August 01, 2023 @11:35AM (#36957400)
Or you can have some automated benchmarks as part of your CI pipeline that will compare performance numbers to previous builds to know if there is a regression that ends up mattering.

An added benefit is that you can use it to do PGO and potentially eek out some more performance: https://en.wikipedia.org/wiki/Profile-guided_optimization

Re:Can you trust a compiler to optimize your code? by 10000truths on Tuesday August 01, 2023 @12:40PM (#36958458)
Automated benchmarks are good practice, but they're not a substitute for compile-time feedback. I would much prefer the immediate results from a compiler error, over the minutes-long wait for a traditional CI pipeline to finish.
Re:Can you trust a compiler to optimize your code? by voidbert on Tuesday August 01, 2023 @02:09PM (#36959958)
It shouldn't be too hard to write a script that objdumps a list of functions and checks if SIMD instructions are used. Strap it to your build system / CI pipeline and you're good to go. Of course, it'd be better if compilers could do that natively.