-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
performanceMust go fasterMust go faster
Description
julia> hsum(x...) = sum(abs2.(float.(x)));
julia> gsum(x...) = sum(y -> abs2(float(y)), x);
julia> @btime gsum(1.,2.,3.,4.,5.,6.,7.,8.)
10.907 ns (0 allocations: 0 bytes)
204.0
julia> @btime hsum(1.,2.,3.,4.,5.,6.,7.,8.)
2.436 ns (0 allocations: 0 bytes)
204.0
gsum
should not be so slow compared to hsum
, right?
Metadata
Metadata
Assignees
Labels
performanceMust go fasterMust go faster