3 ms·
fully agree, use strict-aliasing only after profiling and on your bottleneck code, if necessary, otherwise, just use no-strict-aliasing(linux kernel uses it too
by synergy20 4y ago
fully agree, use strict-aliasing only after profiling and on your bottleneck code, if necessary, otherwise, just use no-strict-aliasing(linux kernel uses it too)
- astrange 4y ago`-fno-strict-aliasing` is even less formally defined than C itself is, so I don't think it's a good tool, you're just hoping it works for your program and not actually checking. UBSan/ASan cleanliness is a better goal.
- synergy20 4y agosince linux kernel depends on it, I would assume it's solid. I do use UBSan/ASan as well, but I can't enable them for production run, and I can with no-strict-aliasing, which is at least safer than without-it.