3 ms·
Julia is pretty good at dealing with this now though julia> @btime test1(10^5) 147.427 μs (0 allocations: 0 bytes) 99999.1 julia> @btime tes
by kristofferc 8y ago
Julia is pretty good at dealing with this now though
julia> @btime test1(10^5)
147.427 μs (0 allocations: 0 bytes)
99999.1
julia> @btime test2(10^5)
88.472 μs (0 allocations: 0 bytes)
99999.1
In earlier versions of Julia, the penalty here would be order of magnitudes worse.