The following code takes an extremely long time to compile on my computer:
x = randn(10000);
hypot(x...) # 220.104289 seconds (66.32 M allocations: 5.422 GiB, 0.88% gc time, 100.00% compilation time)
hypot(x...) # 0.001436 seconds (60.03 k allocations: 2.290 MiB)
I’d imagine that splatting such a large vector causes issues. I’d like to clarify: is this intended behaviour? Is the underlying algorithm for hypot only a good idea for small vectors regardless, or does the fact that we have to splat prevent the use of hypot on larger vectors even though it would be a good idea to do so otherwise?
If any case, perhaps some clarification should be added to the Julia docs, because as a new Julia user looking for a way to find the L_2 norm of a vector, I simply saw hypot(x...) and ran with it, which led me to code with a very long compilation time, that crashed for very large vectors.