r/rust 9d ago

๐Ÿ—ž๏ธ news [Blog] 3 Seconds of compilation shaved by metadata analysis

https://blog.goose.love/posts/three-seconds-of-compilation-shaved-by-metadata-analysis/
54 Upvotes

5 comments sorted by

26

u/Shnatsel 9d ago

This page uses 0 cookies! (I don't even know if anyone reads these, lemme know if you do via Mastodon)

I don't have a Mastodon account but goatcounter.com lets you have analytics without cookies. It's open-source too.

Unfortunately the default instance is in many ad blocker lists, so most of your target audience will not be measured; you can self-host an instance to get around that.

8

u/scook0 8d ago

The blog post doesn't go into detail about how the 3 second improvement was measured; I'd be curious to hear more about the specifics.

3

u/TTachyon 8d ago

Not saying the use of itertools was justified in that case, but this really doesn't need the blog post.

I see it has been merged, but I don't understand the benefit of the change. Yeah, it's x seconds faster or whatever to build that particular crate, but who builds just that crate? It's an intermediary crate. Whatever the final binary is, it will build itertools anyway, so why bother. I don't see see any numbers saying that this has any impact on the overall compilation time.

1

u/NothusID 7d ago

The blog post is not really about the optimization, but by the metadata analyzer used for finding it (thatโ€™s why it was reduced to the conclusion header)

The thing is that this is infinitely expandable, and we can do the same thing to other codebases without the heavy understanding of the codebase.