3 ms·
It's also worth noting that although modern C/C++ has the `restrict` keyword, compilers for those languages are generally worse at actually using that informati
by johncolanduoni 6y ago
It's also worth noting that although modern C/C++ has the `restrict` keyword, compilers for those languages are generally worse at actually using that information. For example, there's been a long running series of LLVM bugs that has (several times) required Rust to stop emitting that metadata because it would actually miscompile fairly simple vector operations that used `restrict`[1]. I'm hopeful that Flang (the Fortran LLVM compiler) will shake most of those out, since there's a large body of Fortran code that relies on good aliasing optimizations.
[1]: https://github.com/rust-lang/rust/issues/54878 https://github.com/rust-lang/rust/issues/54878
- saagarjha 6y agoJust C. The various “restrict equivalents” in C++ are non-standard.