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:

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 100%94%2=11.64%100\% - 94\%^2 = 11.64\% :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