Stipple.jl icon indicating copy to clipboard operation
Stipple.jl copied to clipboard

Add precompilation

Open PallHaraldsson opened this issue 4 years ago • 1 comments
trafficstars

Currently:

$ ~/julia-1.6.0-rc1/bin/julia --compile=min -O0 --startup-file=no 

takes seconds of startup, but could likely be even faster than:

julia> @time using Stipple
  0.981060 seconds (1.22 M allocations: 84.544 MiB, 3.96% gc time)

Likely you would use Snoopcompile, I haven't look at recently after some changes, I only ran with: --trace-compile=stderr

to get:

precompile(Tuple{typeof(Base.gc_num)})
precompile(Tuple{typeof(Base.cumulative_compile_time_ns_before)})
precompile(Tuple{typeof(Base._growend!), Array{String, 1}, Int64})
precompile(Tuple{typeof(Base._growbeg!), Array{Type, 1}, Int64})
precompile(Tuple{Type{Array{Revise.FileInfo, 1}}, UndefInitializer, Int64})
precompile(Tuple{typeof(Core._Task), Any, Int64, Base.GenericCondition{Base.Threads.SpinLock}})
precompile(Tuple{typeof(MbedTLS.__ctr_drbg__init__)})
precompile(Tuple{typeof(MbedTLS.__sslinit__)})
precompile(Tuple{typeof(MbedTLS.__entropyinit__)})
precompile(Tuple{typeof(Core.Compiler.return_type), Any, Any})
precompile(Tuple{Type{Array{Base.PkgId, 1}}, UndefInitializer, Int64})
precompile(Tuple{typeof(Base.unsafe_convert), Type{Ptr{Base.PkgId}}, Array{Base.PkgId, 1}})
precompile(Tuple{typeof(Base.unsafe_convert), Type{Ptr{Base.Pair{Base.PkgId, UInt64}}}, Array{Base.Pair{Base.PkgId, UInt64}, 1}})
precompile(Tuple{Type{Array{Revise.RelocatableExpr, 1}}, UndefInitializer, Int64})
precompile(Tuple{Type{Array{Union{Nothing, Array{Any, 1}}, 1}}, UndefInitializer, Int64})
precompile(Tuple{Type{Array{Module, 1}}, UndefInitializer, Int64})
precompile(Tuple{Type{Array{OrderedCollections.OrderedDict{Revise.RelocatableExpr, Union{Nothing, Array{Any, 1}}}, 1}}, UndefInitializer, Int64})
precompile(Tuple{typeof(Base.objectid), Any})
precompile(Tuple{typeof(OrderedCollections._setindex!), OrderedCollections.OrderedDict{Module, OrderedCollections.OrderedDict{Revise.RelocatableExpr, Union{Nothing, Array{Any, 1}}}}, OrderedCollections.OrderedDict{Revise.RelocatableExpr, Union{Nothing, Array{Any, 1}}}, Module, Int64})
precompile(Tuple{Type{Array{Tuple{Module, Expr}, 1}}, UndefInitializer, Int64})
precompile(Tuple{typeof(Base._growend!), Array{Revise.FileInfo, 1}, Int64})
precompile(Tuple{typeof(Base.Filesystem.cd), Revise.var"#40#41"{Revise.PkgData}, String})
precompile(Tuple{typeof(Base.PCRE.create_match_data), Ptr{Nothing}})
precompile(Tuple{typeof(Base.unsafe_convert), Type{Ptr{UInt8}}, String})
precompile(Tuple{typeof(Base.unsafe_string), Ptr{UInt8}, Int64})
precompile(Tuple{typeof(Base.Libc.time)})
precompile(Tuple{typeof(Base._crc32c), Base.UUID, UInt32})
precompile(Tuple{typeof(Base.unsafe_crc32c), Base.RefValue{Tuple{UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8}}, UInt64, UInt32})
precompile(Tuple{typeof(Base.cumulative_compile_time_ns_after)})

what should help to be put in.

PallHaraldsson avatar Feb 17 '21 17:02 PallHaraldsson

@PallHaraldsson that looks great, thanks so much. I'll set up a task, definitely worth adding in.

essenciary avatar Feb 21 '21 10:02 essenciary