3 ms·
Cross posting from https://www.reddit.com/r/programming/comments/bjwhm5/introduction_the_zig_programming_language/emc30to/ https://www.reddit.com/r/programming/
by AndyKelley 7y ago
Cross posting from https://www.reddit.com/r/programming/comments/bjwhm5/introduction_the_zig_programming_language/emc30to/ https://www.reddit.com/r/programming/comments/bjwhm5/introdu...
Parameters can have `noalias` on them. This is [currently undocumented](https://github.com/ziglang/zig/issues/1521 https://github.com/ziglang/zig/issues/1521) and [not yet safety checked](https://github.com/ziglang/zig/issues/476 https://github.com/ziglang/zig/issues/476) and there is an [open area of research considering doing it the opposite way](https://github.com/ziglang/zig/issues/1108 https://github.com/ziglang/zig/issues/1108). Provided that it could be safety-checked, opt-in aliasing has the potential to make Zig even faster. As far as I'm aware, this is currently the only way in which Rust could potentially outperform Zig (and C).