# Does it make sense to short-circuit \`isassigned\` for arrays of bitstypes?

**URL:** <https://discourse.julialang.org/t/does-it-make-sense-to-short-circuit-isassigned-for-arrays-of-bitstypes/107666>\
**Category:** Internals & Design\
**Tags:** array\
**Created:** [December 15, 2023, 2:11pm UTC](https://discourse.julialang.org/t/does-it-make-sense-to-short-circuit-isassigned-for-arrays-of-bitstypes/107666 "2023-12-15T14:11:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jishnub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jishnub/32/33620_2.png) [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Post date:** [December 15, 2023, 2:11pm UTC](https://discourse.julialang.org/t/does-it-make-sense-to-short-circuit-isassigned-for-arrays-of-bitstypes/107666/1 "2023-12-15T14:11:29Z")

</div>

E.g. something like

```julia
julia> @inline _isassigned(A::Array{Float64}, inds...) = (@boundscheck checkbounds(Bool, A, inds...); true)
_isassigned (generic function with 1 method)

julia> @code_typed (A -> @inbounds _isassigned(A, 1))(ones(2))
CodeInfo(
1 ─ return true
) => Bool

```

This does not need a foreign call. Are there cases that I’ve not thought about?
