Aliasing

xania.org

70 points by ibobev 6 days ago


turol - 7 hours ago

For a real world example of how this can affect code check out this commit I made in mesa: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20...

Ono-Sendai - 5 hours ago

When you have done enough C++ you don't need to fire up compiler explorer, you just use local variables to avoid aliasing pessimisations.

I also wrote about this a while ago: https://forwardscattering.org/post/51

adev_ - 7 hours ago

Aliasing is no joke and currently the only reason why some arithmetic intensive code-bases still prefer Fortran even nowadays.

While it is possible to remove most aliasing performance issues in a C or C++ codebase, it is a pain to do it properly.

Bootvis - 10 hours ago

The whole series is excellent and as a non regular user of assembly I learned a ton.

andrepd - 2 hours ago

Thank you Rust for having aliasing guarantees on references!

artemonster - 9 hours ago

I wonder how much potential optimisation there is if we entirely drop pointer nonsense.