You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the example from the readme on 0.7.0-DEV.2484
using BenchmarkTools
using StructsofArrays
regular =complex(randn(1000000), randn(1000000))
soa =convert(StructOfArrays, regular)
functionf(x, a)
s =zero(eltype(x))
@simdfor i in1:length(x)
@inbounds s += x[i] * a
end
s
end@benchmarkf(regular, 0.5+0.5im)
@benchmarkf(soa, 0.5+0.5im)
Leads to the disappointing result of:
julia> @benchmark f(regular, 0.5+0.5im)
BenchmarkTools.Trial:
memory estimate: 64 bytes
allocs estimate: 2
--------------
minimum time: 786.494 μs (0.00% GC)
median time: 817.898 μs (0.00% GC)
mean time: 864.446 μs (0.00% GC)
maximum time: 4.601 ms (0.00% GC)
--------------
samples: 5757
evals/sample: 1
julia> @benchmark f(soa, 0.5+0.5im)
BenchmarkTools.Trial:
memory estimate: 64 bytes
allocs estimate: 2
--------------
minimum time: 1.091 ms (0.00% GC)
median time: 1.261 ms (0.00% GC)
mean time: 1.359 ms (0.00% GC)
maximum time: 7.935 ms (0.00% GC)
--------------
samples: 3661
evals/sample: 1
and inspection of the @code_llvm shows that there are still oob blocks visible and no vectorization is happening.
The text was updated successfully, but these errors were encountered:
Running the example from the readme on
0.7.0-DEV.2484
Leads to the disappointing result of:
and inspection of the
@code_llvm
shows that there are stilloob
blocks visible and no vectorization is happening.The text was updated successfully, but these errors were encountered: