4 ms·
Is there an element of runtime correctness and safety as well? Are we comparing programs that have proper bounds checking to ones that don't?
by xigency 7y ago
Is there an element of runtime correctness and safety as well? Are we comparing programs that have proper bounds checking to ones that don't?
- ncmncm 7y agoOne hopes that the optimizer has arranged to check the bounds at the start of the loop, and not in it. Apparently Rust's doesn't, yet, but it seems usually to happen to overlap the checking it does with other stalls, so it might not usually matter much.
- kzrdude 7y agoThe actual bounds checking instructions are often negligible in terms of overhead, but it can inflict damage by inhibiting other optimizations and loop optimizations, like reduction or vectorization.
- ncmncm 7y agoLow-hanging fruit. But there are still bigger fish to fry. Lower-hanging bigger fish? Rust isn't mature yet. Give it ten years. It will either exceed C performance, or fade away. It's still too early to say which.