-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exceedingly long compilation time of a function involving StaticArrays #24286
Comments
This is probably due to the inlining that is due to be removed again in :) |
Thanks for looking into this! I'll let you know if this is indeed fixed by merging your PR as soon as I'll be able to use |
Seems to be back on 0.6 times after #24117. Timings for first and second call: julia> @time test();
0.973949 seconds (776.59 k allocations: 36.718 MiB, 1.00% gc time)
julia> @time test();
0.000012 seconds (5 allocations: 704 bytes) |
How can you run the code at all? julia> using StaticArrays
julia> const A1 = SVector(collect(1.0:60.0))
ERROR: UndefVarError: S not defined
Stacktrace:
[1] StaticArrays.Size(::Type{SYSTEM: show(lasterr) caused an error
UndefVarError(:N)
Stacktrace:
[1] StaticArrays.Size(::Type{StaticArrays.SArray{Tuple{S},T,1,S} where T where S}) at /home/mose/.julia/v0.7/StaticArrays/src/traits.jl:51
[2] length(::Type{StaticArrays.SArray{Tuple{S},T,1,S} where T where S}) at /home/mose/.julia/v0.7/StaticArrays/src/abstractarray.jl:2
[3] convert at /home/mose/.julia/v0.7/StaticArrays/src/convert.jl:21 [inlined]
[4] StaticArrays.SArray{Tuple{S},T,1,S} where T where S(::Array{Float64,1}) at /home/mose/.julia/v0.7/StaticArrays/src/convert.jl:4
[5] eval(::Module, ::Expr) at ./repl/REPL.jl:3
[6] eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./repl/REPL.jl:69
[7] macro expansion at ./repl/REPL.jl:100 [inlined]
[8] (::getfield(Base.REPL, Symbol("##1#2")){Base.REPL.REPLBackend})() at ./event.jl:96 |
|
Exactly same configuration here... |
Oh, and I also changed |
You cheated! ;-) Ok, now it works for me and the reported issue is indeed fixed, thanks. However, running the function is slightly slower on master than on Julia 0.6, 2.400 μs vs 2.127 μs, according to |
I have a function which takes way too much to be compiled on Julia master, 10x slower than on Julia 0.6. It involves
StaticArrays.jl
. Actually, this package seems to be quite broken right now on Julia master, just entering the lineSvector
makes Julia crash very badly.That said, until a couple of days ago this function:
took about 9-10 seconds to be run the fist time on Julia master (so including compilation time), while it takes ~0.9 seconds to be run the first time on Julia 0.6. The code returned by
@code_llvm
on Julia master is loooong, more than 5k lines, it doesn't fit in my terminal screen. My full (non-minimal) function takes actually even longer to be compiled, about 35 seconds, In Julia 0.6 it takes 1.5 seconds, what seems to cause the huge slowdown should be thosesin
andcos
calls.I was trying to reduce further the example, but a few minutes ago I updated Julia and I don't have the time to go back to a working version.
The text was updated successfully, but these errors were encountered: