Earlier quoted context omitted.
Or it could be "bold".
Or “weld”. Which I think might just be the greatest name for a new linker.
Mold: A Modern Linker
61–70 of 125 posts
Re: Mold: A Modern Linker
#62Earlier quoted context omitted.
I chose mmap based on benchmarking. Writing a 2 GiB memory buffer to a file using write(2) was slower than directly constructing file contents to mmap'ed memory region. What is more interesting is the real bottleneck was not about mmap vs write(v) but in the filesystem. If you create a fresh file and write 2 GiB of data to that file, it takes like 700 milliseconds on my machine (ext4 fs), but if you write the same am…
> So, the filesystem's performance to allocate new disk blocks seems to limit the performance of my linker. If you know the total size ahead of time, you might try using fallocate(2).
Re: Mold: A Modern Linker
#63Re: Mold: A Modern Linker
#64From a marketing perspective, "mold" meaning "a form used to cast an object from liquid" is a lot more appealing than "green fungus growing on bread." A mold for casting objects is also a lot closer, metaphorically speaking, to what a linker does. I honestly thought that was the meaning the author was trying to evoke before I saw the picture on the github page.
Author here. Haha, that's perhaps true. But at the same time, it seems like a tradition to give a silly name (e.g. "git") to a tool, and I actually like that name and the image to show that I'm not too serious. This is a fun project but not ready for production use.
EDIT: You may just have to settle for speed/parallelism being conveyed by 2..3 spigots pouring in. :-) It's perfect - you can stay with moldy bread while it is a major work in progress and evolve to the more finished logo when your own work is "hardened" -- all without changing the name. ;-)
[1] https://www.foodandwine.com/cooking-techniques/baking/best-b...
Re: Mold: A Modern Linker
#65Re: Mold: A Modern Linker
#66Earlier quoted context omitted.
> So, the filesystem's performance to allocate new disk blocks seems to limit the performance of my linker. If you know the total size ahead of time, you might try using fallocate(2).
I actually tried fallocate(2) but it didn't change the performance characteristics at all. It doesn't seem to do what its man page says.
Re: Mold: A Modern Linker
#67Isn’t ‘cat’ io-bound?
Re: Mold: A Modern Linker
#68I’m surprised by the statement that ‘cat’ is slow because it’s not multithreaded. Isn’t ‘cat’ io-bound?
Re: Mold: A Modern Linker
#69I wonder how rui314's assertion that incremental linking is a poor tradeoff squares with Zig's decision[1] to build its own linker with "in-place binary patching". I assume part of the difference is that Zig has complete control over its environment, whereas Mold is trying to be a general-purpose linker, but still, I wonder if there's some insight to be gained from crosspollination there. (like, maybe Mold could have…
[0] https://github.com/ziglang/zig/issues/1535#issuecomment-6784...
Re: Mold: A Modern Linker
#70Can this already be used with Rust? I currently use LDD which already brought some speed up.