IRTools.jl
IRTools.jl copied to clipboard
@nospecialize slows down first time inference
I notice the use of @nospecialize slows down the first time inference when using IRTools functions (e.g Pipe, update!) a lot, not sure why
# without nospecialize
6.351286 seconds (10.75 M allocations: 572.988 MiB, 5.41% gc time)
# with nospecialize
7.406211 seconds (14.54 M allocations: 773.888 MiB, 5.02% gc time)
I suspect this is also causing other things (like Zygote) to be extremely slow for the first run.
You could reproduce this via this branch: https://github.com/QuantumBFS/YaoLang.jl/pull/25
using
julia --project precompile.jl
in the project folder