Rust allows you to turn off array index bounds checks like this:
let mut k = *some_array.get_unchecked(j); ........... *some_array.get_unchecked_mut(j) = k - kn;
This ccurs in a code segment marked as
unsafe, but unsafe in Rust really just means the programmer has manual control, and better know what’s s/he’s doing, which I do for this code segment.
I’m doing this because this is part of an inner loop in this algorithm and significantly increases performance compared to the normal bounds-checked array version.
I was wondering is something like this possible in Crystal too?