Zulip Chat Archive
Stream: mathlib4
Topic: 2 × 6% mathlib build speedup (clickbait title)
Joachim Breitner (Apr 28 2024 at 16:49):
I benchmarked two small changes to lean4 using the speedcenter, and both gave a 6% build time improvement:
- http://speed.lean-fro.org/mathlib4/compare/d444b71b-0228-43f5-951d-975ddabbc565/to/77bd3441-1d67-4527-9a0c-188a17a83b8f
- http://speed.lean-fro.org/mathlib4/compare/d444b71b-0228-43f5-951d-975ddabbc565/to/f1d3f7dd-931f-4250-9a10-263dbc927957
So if I merge them both, does that mean we’ll get ~12% improvement?…
Unfortunately, this is too good to be true; the “instruction count” tells a different (and more plausible) story. It seems that this particular base line build took longer than usual, and now everything I do looks like an improvement. Oh well, it would have been so nice…
Yaël Dillies (Apr 28 2024 at 17:00):
Clearly that's wrong because you forgot how percentages work. The expected speedup is :grinning:
Joachim Breitner (Apr 28 2024 at 17:02):
I took this into account, accounted lazily , and wrote ~
for that reason :-)
Joachim Breitner (Apr 28 2024 at 17:03):
Also, if they improve independent code paths, the speedup will even be more than 12%!
Last updated: May 02 2025 at 03:31 UTC