Comment by Aurornis

2 days ago

> Yes. Java and python are not competitive for graphics and audio processing.

Because Python is an interpreted language and Java has garbage collection, not because they have bounds checking.

Using a language like Rust the bounds checking overhead compared to C code is usually minimal, like 0-5%. The compiler can even optimize away many bounds checks (safely) if you structure your code properly, such as with iterators.

Here's an example article : https://shnatsel.medium.com/how-to-avoid-bounds-checks-in-ru...

Make sure you read the note about how the author was mistaken about the 15% speedup from bounds checking. The actual bounds check change was much less, like a couple percent. You can even structure your code so that the bounds check disappears altogether when the compiler can confirm safety at compile time.