6 ms·
The principal difference is that rust constrains aliasing somewhat more than c. The practical differences currently are more relevant to compilers than cpus, s
by moonchild 3y ago
The principal difference is that rust constrains aliasing somewhat more than c. The practical differences currently are more relevant to compilers than cpus, since architectures do not provide a way for programs to provide aliasing information to the cpu, and so cpus do their alias analysis dynamically, in a way that works as well for rust as for c. But one can imagine an architecture which allowed programs to supply aliasing information statically. This would be relevant for both c and rust, just somewhat more so for rust.