Kristoffer Carlsson

Results 1634 comments of Kristoffer Carlsson

``` julia> @time using Enzyme 0.383814 seconds (566.30 k allocations: 33.282 MiB, 21.24% compilation time: 27% of which was recompilation) ``` But: ``` julia> @time using Tracker 1.450969 seconds (1.83...

Okej, Tracker committed the mortal sin of defining `show` on a `Type`. With https://github.com/FluxML/Tracker.jl/pull/156 this is improved to ``` julia> @time using Tracker 1.463012 seconds (1.90 M allocations: 113.004 MiB,...

From some testing, it seems the `__init__` that takes a long time to compile is https://github.com/EnzymeAD/Enzyme.jl/blob/019258a55ce7f9699c91cb87bb584640dd5b33e2/src/compiler.jl#L2425-L2454

Running the `register_llvm_rules()` in a module where optimizations are turned off more or less fixes the bad behavior: https://github.com/KristofferC/Enzyme.jl/commit/4246ddb42b18ef43958774b13621f6160f7992a8#diff-21145f7299f4174cfb41f7c0c845a0ee798fc065bae0a352171552dc4b810508R1033 However, I have no idea what impact this has on runtime...

> Is there any other way we can cut down on load time here? I guess these are the possibilities: - Move things from load time to "on demand time"...

> But I wonder if it impacts the callbacks, if it is only the trampoline that should be fine. That's what I was worried about as well. I think the...

S it seems the issue is that JuliaSyntax has a lot higher latency than Tokenize on 1.8: 1.8: ``` julia> @time @eval collect(JuliaSyntax.Tokenize.Lexer("1+1 == 2")); 1.036372 seconds (158.03 k allocations:...

I did try to add an explicit precompile statement to JuliaSyntax as well but I didn't get it to "stick". If I executed that precompile statement in the REPL after...

Tokenize runs with O1 https://github.com/JuliaLang/Tokenize.jl/blob/8d2aa01f8f814de060ff8f80f164cb8909c899c7/src/Tokenize.jl#L4 but I doubt that would cause such a big change.

It potentially could but it is not completely straight forward.