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

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:

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

2 Likes

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.

1 Like