You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if we could precompile some functions to reduce first time latency calls, e.g. I think we can go from f timings to g timings in this example scenario:
julia>struct A
x::Intend
julia>struct B
y::Float64end
julia>using Accessors
julia>f(s) =@set s.x =3
f (generic function with 1 method)
julia>g(s) =@set s.y =3.0
g (generic function with 1 method)
julia> s =A(1)
A(1)
julia>@time@evalf(s)
0.160497 seconds (98.85 k allocations:7.246 MiB, 99.89% compilation time)
A(3)
julia> s =B(1.0)
B(1.0)
julia>@time@evalg(s)
0.013224 seconds (39.48 k allocations:2.671 MiB, 98.70% compilation time)
B(3.0)
which is more than 10 times better
The text was updated successfully, but these errors were encountered:
I'm not too familiar with optimal precompilation setups, but personally won't be against a PR that provides measurable improvements to TTFX. Please, just ensure that precompile times don't become unreasonably long :)
I wonder if we could precompile some functions to reduce first time latency calls, e.g. I think we can go from
f
timings tog
timings in this example scenario:which is more than 10 times better
The text was updated successfully, but these errors were encountered: