3 ms·
If your bounds checks can make your programs as much as twice as slow, then I think it's worth considering that bounds checking is not a panacea for low-level c
by PathOfEclipse 4y ago
If your bounds checks can make your programs as much as twice as slow, then I think it's worth considering that bounds checking is not a panacea for low-level code: https://coaxion.net/blog/2018/01/speeding-up-rgb-to-grayscale-conversion-in-rust-by-a-factor-of-2-2-and-various-other-multimedia-related-processing-loops/#no-more-bounds https://coaxion.net/blog/2018/01/speeding-up-rgb-to-grayscal...
- danhor 4y agoIf the compiler can be sure that there is no bounds checking needed and can skip it. Rust provides facilities for this, C and C++ less so. We have seen time and time again that humans aren't good enugh at that task, even in low-level code (and 2x is very buch an outlier).
- deleted 4y ago[deleted]