# Removing bounds checking for HPC - \`--check-bounds=unsafe\`?

**URL:** https://discourse.julialang.org/t/removing-bounds-checking-for-hpc-check-bounds-unsafe/124897
**Category:** Julia at Scale
**Tags:** performance, hpc, inbounds, bounds-check
**Created:** [January 18, 2025, 2:28pm UTC](https://discourse.julialang.org/t/removing-bounds-checking-for-hpc-check-bounds-unsafe/124897 "2025-01-18T14:28:27Z")
**Posts on this page:** 1
**Showing post:** 17

<div class="post-metadata">

### Author: ![greatpet](https://avatars.discourse-cdn.com/v4/letter/g/e495f1/32.png) [@greatpet](https://discourse.julialang.org/u/greatpet)
#### Post date: [January 18, 2025, 9:04pm UTC](https://discourse.julialang.org/t/removing-bounds-checking-for-hpc-check-bounds-unsafe/124897/17 "2025-01-18T21:04:59Z")

</div>

> [@giordano](#):
>
> The main problem of `--check-bounds=no` is that it’s a global setting which affects the entire session, including the Julia runtime and compiler

Maybe someone can develop an `InboundsArray` type whose `setindex` and `getindex`methods are defined with `@inbound` operations of the actual array wrapped, as a drop-in replacement of the Base Array. Then using `InboundsArray` is guaranteed to only affect user code not Julia internals. This could be more ergonomic than using `@inbounds` macro and chasing its propagation. (Except, of course, you’ll need to understand the danger.)

---

_[View the full topic](https://discourse.julialang.org/t/removing-bounds-checking-for-hpc-check-bounds-unsafe/124897)._
