reinterpret(reshape, T, A)
is (still) slow on Windows
#39382
Labels
compiler:codegen
Generation of LLVM IR and native code
performance
Must go faster
system:windows
Affects only Windows
Uh oh!
There was an error while loading. Please reload this page.
PR #37559 introduced
reinterpret(reshape, T, A)
(ReshapedReinterpretArray
) to improve the performance.However, it does not always improve the speed on Windows (in some cases it slows things down). Since this issue is related to vectorization, the generated code can vary greatly depending on how the iterator is used. So, here is a very simple example.
The result of
@code_typed
is the same on Linux and Windows, but the result of@code_llvm
is very different.LLVM IR on v1.6.0-beta1 Linux
LLVM IR on v1.6.0-beta1 Windows
I don't understand why there is a difference between OSs, but in this case, the
memcpy
function call is not removed on Windows, causing a stall. (see #38751)julia/base/reinterpretarray.jl
Line 346 in 69d2453
The direct cause of the stall is the
memcpy
, but I don't know if it is the root cause.This issue comes from the discussion in JuliaGraphics/ColorTypes.jl#220.
cc: @timholy
The text was updated successfully, but these errors were encountered: