-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
improve compile latency #1686
improve compile latency #1686
Conversation
SimonDanisch
commented
Feb 22, 2022
- improve inferrability
- remove StaticArrays
- update precompiles
This gets away from the gensymmed functions and instead executes code to force compilation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
metrics/ttfp/benchmark-ttfp.jl
Outdated
@@ -0,0 +1,4 @@ | |||
t_using = @elapsed using CairoMakie | |||
t_plot = @elapsed save("test.png", scatter(1:4)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
t_plot = @elapsed save("test.png", scatter(1:4)) | |
t_plot = (tstart = time(); save("test.png", scatter(1:4)); time() - tstart) |
For latency it's safer to use this form because @time
and @elapsed
will precompile the workload. (If most of it is hidden behind runtime dispatch, this isn't a big deal, but in cases with really good inference you might eliminate the latency by trying to measure it.)
metrics/ttfp/track_pr_ttfp.jl
Outdated
Pkg.precompile("CairoMakie") | ||
|
||
result_1_7 = read(`julia --project=. ./benchmark-ttfp.jl`, String) | ||
result_th = read(`./../../../../julia_th/julia --project=. ./benchmark-ttfp.jl`, String) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing most people won't have this directory on their system. (Glad you're testing it, though!)