3 ms·
> Note that I benchmarked with --check-bounds=no, which is a startup option that you pass to Julia, when launching, that disables the performance killer “bounds
by Athas 4y ago
> Note that I benchmarked with --check-bounds=no, which is a startup option that you pass to Julia, when launching, that disables the performance killer “bounds checking”.
Why is bounds checking a performance killer?
- cancandan 4y agoCheck this out. https://docs.julialang.org/en/v1/devdocs/boundscheck/ https://docs.julialang.org/en/v1/devdocs/boundscheck/
- physicsguy 4y agoIf you add bounds checking, then what happens is that on every index into the array, a line of code gets called that says "is the index the user specified less than the length of the array". On it's own, that's not a problem, but when you're doing this repeatedly millions of times, it's a performance killer.
- Athas 4y agoStill, I would expect the overhead to be moderate, not a killer.
- ChrisRackauckas 4y agoBounds checking can block the ability to auto-generate SIMD, which then has a larger effect than the operations of the bounds checking itself.