Skip to content
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

use the new SnoopPrecompile #2153

Merged
merged 4 commits into from
Jul 19, 2022
Merged

use the new SnoopPrecompile #2153

merged 4 commits into from
Jul 19, 2022

Conversation

SimonDanisch
Copy link
Member

Since it's not registered yet and actually a pretty small macro, I've just inlined it into Makie for now...

@MakieBot
Copy link
Collaborator

MakieBot commented Jul 19, 2022

Compile Times benchmark

Note, that these numbers may fluctuate on the CI servers, so take them with a grain of salt. All benchmark results are based on the mean time and negative percent mean faster than the base branch. Note, that GLMakie + WGLMakie run on an emulated GPU, so the runtime benchmark is much slower. Results are from running:

using_time = @ctime using Backend
# Compile time
create_time = @ctime fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @ctime Makie.colorbuffer(display(fig))
# Runtime
create_time = @benchmark fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @benchmark Makie.colorbuffer(display(fig))
using create display create display
GLMakie 14.42s (13.72, 15.43) 0.76+- 18.25s (17.44, 19.52) 0.93+- 16.22s (15.14, 17.32) 0.77+- 17.96ms (17.39, 19.18) 0.79+- 78.43ms (76.28, 80.90) 1.62+-
master 11.83s (11.21, 12.72) 0.70+- 22.54s (20.99, 23.90) 1.38+- 18.45s (17.46, 19.47) 0.96+- 24.55ms (23.18, 25.78) 1.20+- 88.02ms (82.95, 92.74) 3.02+-
evaluation +17.94%, 2.59s slower❌ (3.53d, 0.00p, 0.73std) -23.54%, -4.3s faster✅ (-3.65d, 0.00p, 1.15std) -13.74%, -2.23s faster✅ (-2.56d, 0.00p, 0.87std) -36.71%, -6.59ms faster✅ (-6.50d, 0.00p, 0.99std) -12.23%, -9.59ms faster✅ (-3.96d, 0.00p, 2.32std)
CairoMakie 17.49s (17.38, 17.57) 0.07+- 28.18s (27.87, 28.41) 0.18+- 3.52s (3.46, 3.57) 0.03+- 36.25ms (35.74, 36.61) 0.30+- 32.67ms (32.27, 33.31) 0.37+-
master 13.40s (13.25, 13.73) 0.16+- 33.49s (33.21, 33.61) 0.14+- 4.81s (4.70, 4.92) 0.09+- 30.77ms (30.27, 31.10) 0.34+- 31.38ms (31.00, 31.92) 0.31+-
evaluation +23.34%, 4.08s slower❌ (34.20d, 0.00p, 0.11std) -18.84%, -5.31s faster✅ (-32.89d, 0.00p, 0.16std) -36.38%, -1.28s faster✅ (-19.65d, 0.00p, 0.06std) +15.12%, 5.48ms slower❌ (17.12d, 0.00p, 0.32std) +3.95%, 1.29ms slower X (3.74d, 0.00p, 0.34std)
WGLMakie 16.98s (16.81, 17.12) 0.11+- 32.39s (32.01, 32.67) 0.22+- 45.48s (44.64, 47.36) 0.89+- 24.89ms (24.38, 25.25) 0.31+- 1.72s (1.68, 1.78) 0.03+-
master 13.62s (13.52, 13.70) 0.06+- 33.85s (33.46, 34.44) 0.30+- 54.41s (53.55, 55.31) 0.64+- 23.57ms (22.88, 24.16) 0.41+- 1.70s (1.65, 1.74) 0.03+-
evaluation +19.77%, 3.36s slower❌ (37.65d, 0.00p, 0.09std) -4.51%, -1.46s faster ✓ (-5.54d, 0.00p, 0.26std) -19.63%, -8.93s faster✅ (-11.53d, 0.00p, 0.77std) +5.27%, 1.31ms slower❌ (3.63d, 0.00p, 0.36std) +1.15%, 0.02s invariant (0.61d, 0.28p, 0.03std)

@SimonDanisch
Copy link
Member Author

The using times slow down are expected, since this now caches precompiles for much more than just scatter....
The speed up and one slow down of run time must be noise, although the GLMakie one seems to be real, since it has been showing up pretty consistently.
Must be the change in screen.jl (maybe closeall(screen_ref)?).
Pretty happy about the improvement in general (thanks @timholy, this macro is really amazing and has been on my bucket list for quite some time :) ).

@SimonDanisch SimonDanisch merged commit 02bb80e into master Jul 19, 2022
@SimonDanisch SimonDanisch deleted the sd/snoop-precompile branch July 19, 2022 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants