this post was submitted on 26 Jul 2023
20 points (100.0% liked)

Rust Programming

8011 readers
1 users here now

founded 5 years ago
MODERATORS
 

According to the readme, Rust is supported, did anyone tried and noticed improvement? rui314/mold: Mold: A Modern Linker 🦠 https://github.com/rui314/mold

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

Debug builds link in <.4 seconds.

With such a small program I expected fixed costs to dominate. Not surprising there is no or almost no difference. You really have to go to cases where linking takes 10s of seconds to see scaling difference, even between ld.bfd and ld.gold.

I did those sort of measurements for my work at the time (a few years ago, before mold was a thing). I have not had the cause or opportunity to measure lld or mold however. Maybe it isn't faster than lld (certainly it seems so for small projects), but I don't think these result say anything useful about larger programs.

The best option is not to take the word of others (myself included) however, but measure on your own application and see which is the best option in your case.

If you however do want to measure linking something big, look at something like Chromium. That isn't rust code though. Not sure what a suitably large rust project would be.