← Back to context

Comment by randusername

2 months ago

> Learning to check the compliers optimization reports is arguably more valuable

Where do I start?

I want to trust the compiler, but I don't always have time to feed every little piece into compiler explorer and interpret it. Is there a higher-level workflow?

In addition to godbolt and reading the output, the scalable check is just benchmarks. When you write new code that you want to autovectorize, you can check it in ways mentioned already. But then IMO the biggest downside of autovectorization is that it can suddenly disappear with seemingly minor code changes. For that you want benchmarks that run in CI or on some regular schedule. Then when you see a regression you can use a profiler plus the other mentioned tools to investigate

this is amazing https://godbolt.org/, you can just paste a function or a bunch of them and instantly see what is generated. It doesn´t take being an expert to start to recognize the (auto) vectorized bits

You can write Julia code as normal and see each compiled function at the REPL. Very similar to a local Compiler Explorer.

Although as mentioned plenty of times, the largest wins tend to come from laying out your data correctly, or switching to a different algorithm. And heuristics. ;)