Open lmiq opened 11 months ago
Version alpha1 of 1.10 series already had the regression:
% time julia +1.10.0-alpha1 --startup-file=no lv2_c.jl 0 1000 0.01 200
typeof(rng) = MarsagliaRng
Mean IS=0.04462564329047784 OOS=-0.0031496723033457423 Bias=0.047775315593823586
43.162031 seconds (180.03 k allocations: 16.689 MiB, 0.38% compilation time)
real 0m43,579s
user 0m43,634s
sys 0m0,347s
julia> versioninfo()
Julia Version 1.10.0-rc1
Commit 5aaa9485436 (2023-11-03 07:44 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 8 × Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
Threads: 1 on 8 virtual cores
Environment:
JULIA_EDITOR = vim
Maybe https://github.com/JuliaLang/julia/pull/49405? I see the first tag that PR is 1.10-alpha, so that adds up.
- The
@simd
macro now has a more limited and clearer semantics, it only enables reordering and contraction of floating-point operations, instead of turning on all "fastmath" optimizations. If you observe performance regressions due to this change, you can recover previous behavior with@fastmath @simd
, if you are OK with all the optimizations enabled by the@fastmath
macro. ([#49405])
I would also check the llvm bump
I must add that in this newer machine I don't see the regression:
julia> versioninfo()
Julia Version 1.10.0-rc1
Commit 5aaa9485436 (2023-11-03 07:44 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 16 × 13th Gen Intel(R) Core(TM) i7-1360P
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, goldmont)
Threads: 1 on 16 virtual cores
Can it be related to #51814?
Related to this discourse thread:
https://discourse.julialang.org/t/trivial-port-from-c-rust-to-julia/105787/46?u=lmiq
The code posted here runs much faster in 1.9.4 than in 1.10+rc1:
The issue is related in how the loop that starts with
for i in (ilong:ncases-2)
is lowered. If one adds@simd
to that loop, performance become:The code: