# Performance regression on v1.12 (nightly): \`hypot(::Float64, ::Float64)\` causes allocations

**URL:** <https://discourse.julialang.org/t/performance-regression-on-v1-12-nightly-hypot-float64-float64-causes-allocations/123871>\
**Category:** Internals & Design\
**Tags:** performance, nightly, regression, allocations\
**Created:** [December 16, 2024, 1:27am UTC](https://discourse.julialang.org/t/performance-regression-on-v1-12-nightly-hypot-float64-float64-causes-allocations/123871 "2024-12-16T01:27:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [December 16, 2024, 1:27am UTC](https://discourse.julialang.org/t/performance-regression-on-v1-12-nightly-hypot-float64-float64-causes-allocations/123871/1 "2024-12-16T01:27:46Z")

</div>

I don’t have a MWE yet (tried but failed as of yet), mostly writing this so I wouldn’t forget to make an actual bug report later. I have some code, and profiling it on Julia nightly show that this line allocates `Float64` values:

> <https://github.com/JuliaLang/julia/blob/b4c5e58a976cbe48a6e5ec27f4408312d8073218/base/math.jl#L728-L728>

Clearly the Julia v1.12 compiler is doing something wrong. Seems to work fine on v1.11.

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [December 16, 2024, 5:41am UTC](https://discourse.julialang.org/t/performance-regression-on-v1-12-nightly-hypot-float64-float64-causes-allocations/123871/2 "2024-12-16T05:41:56Z")

</div>

Have a look with Cthulhu and verify that both arguments to `hypot` are properly inferred. It may not be hypot that allocates, but a dynamic dispatch to it.
