2 ms·
Is there some benchmarking work that has quantified this speedup from aliasing guarantees or is this more of a sufficiently smart compiler[1] thing? [1] https:
by fulafel 2y ago
Is there some benchmarking work that has quantified this speedup from aliasing guarantees or is this more of a sufficiently smart compiler[1] thing?
[1] https://kidneybone.com/c2/wiki/SufficientlySmartCompiler https://kidneybone.com/c2/wiki/SufficientlySmartCompiler
- DonaldPShimoda 2y agoThe Sufficiently Smart Compiler is a hypothetical argument used in advocating for a programming language whose naive implementations might tend towards inefficient designs, whereas the aliasing argument is not itself hypothetical but it may not be backed by data. That's a different thing altogether. Whether the aliasing argument holds water does not affect whether it was used as justification for Rust's design.
- vlovich123 2y agoOf course: https://github.com/rust-lang/rust/issues/54878#issuecomment-767151730 https://github.com/rust-lang/rust/issues/54878#issuecomment-... TLDR: 0-5% faster with noalias optimizations on. You can always try running some benchmarks by building code with -Zmutable-noalias=no.
- fulafel 2y agoThanks. If anyone has a link to results handy I'd be intersted. In particular a lot changes can be said to be 0-5% where the average is very close to 0...
- deleted 2y ago[deleted]