# Nextfloat is slower on 2D array than on 1D array

**URL:** https://discourse.julialang.org/t/nextfloat-is-slower-on-2d-array-than-on-1d-array/128380
**Category:** Performance
**Created:** [April 24, 2025, 5:02pm UTC](https://discourse.julialang.org/t/nextfloat-is-slower-on-2d-array-than-on-1d-array/128380 "2025-04-24T17:02:18Z")
**Posts on this page:** 1
**Showing post:** 15

<div class="post-metadata">

### Author: ![danielwe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielwe/32/35657_2.png) [@danielwe](https://discourse.julialang.org/u/danielwe)
#### Post date: [April 25, 2025, 4:27pm UTC](https://discourse.julialang.org/t/nextfloat-is-slower-on-2d-array-than-on-1d-array/128380/15 "2025-04-25T16:27:36Z")

</div>

Another simple reproducer in this thread: [EXCEPTION\_ACCESS\_VIOLATION on Windows but not MacOS - #16 by lewis](https://discourse.julialang.org/t/exception-access-violation-on-windows-but-not-macos/127653/16)

Seems worth an issue?

~~EDIT: is this the one, or is it too old? [regression on inferring inbounds for `eachindex()` · Issue #45507 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/45507) \_~~ No, that’s different and was actually fixed in 1.11.

---

_[View the full topic](https://discourse.julialang.org/t/nextfloat-is-slower-on-2d-array-than-on-1d-array/128380)._
