Benchmarking Wild vs. Mold
Recorded: Sept. 20, 2026, 10 a.m.
| Original | Summarized |
Benchmarking Wild vs Mold | David Lattimore Benchmarking Wild vs Mold Home Mold has recently updated their linker benchmarks and included Wild for the first time. These benchmarks show Wild being substantially slower than Mold in contrast to Wild’s most recently published benchmarks from our last release on August 4th. This post is an attempt to understand why there’s such a difference in the benchmark results. A 64 core (128 thread) Threadripper running Ubuntu 24.04 Wild’s most recent benchmarks were run on one machine: A 16 core (32 thread) Ryzen 9955hx running Ubuntu 26.04 One substantial difference in benchmark configuration is related to the output file. Our benchmarks run with the output file already present from a previous run of the linker. Mold’s benchmarks delete the output file between linker invocations. This can make a substantial difference to the performance of the linker. What difference it makes is also very filesystem dependent. Wild’s benchmarks have historically been run on tmpfs, which was done to reduce noise in benchmarks and to avoid wearing out the SSD. In retrospect, this was probably a mistake, since most users are unlikely to be doing their builds on tmpfs. Mold’s benchmarks use ext4, which is a more sensible choice. Going forward, I’ll probably do a mix of both. Program blender-debug godot-debug blender-release clang-release And here are our results: Benchmark blender-debug godot-debug blender-release clang-release Putting the Wild/Mold ratios together into the one table: Program blender-debug godot-debug blender-release clang-release Given that we’re running on a different CPU architecture with different cache sizes, RAM etc, the results are about as close as we could expect. Benchmark clang-release.ext4-delete-no-fork clang-release.ext4-no-delete-no-fork clang-release.tmpfs-delete-no-fork clang-release.tmpfs-no-delete-no-fork clang-release.tmpfs-no-delete-fork For the remainder of this post, we’ll use a tmpfs+no-delete+fork configuration. From this, we can see that Mold has recently gotten considerably faster. Wild’s August 4th benchmarks were done before Mold’s 2.42.0 and 2.42.1 releases, where the main gains occurred. |
David Lattimore investigated the discrepancies observed between the linker benchmarks of Wild and Mold, noting that Mold recently included Wild for the first time and exhibited substantially slower performance according to newer results. The investigation aimed to determine the causes behind this performance disparity by comparing the environments and configuration settings of the two linker implementations. The analysis began by detailing the differences in the machine setups used for the benchmarks. Mold benchmarks were executed on a 64 core (128 thread) Threadripper running Ubuntu 24.04, and on an Apple M1 Ultra running Asahi Linux. In contrast, Wild's most recent benchmarks were run on a 16 core (32 thread) Ryzen 9955hx running Ubuntu 26.04. Significant differences were also found in the benchmark configurations. One key distinction involved the output file handling: Mold's benchmarks delete the output file between linker invocations, while Wild's historical benchmarks were performed on tmpfs, a choice the author later suggested may have been suboptimal for general users. Mold utilized ext4, which the author considered a more sensible filesystem for this type of testing. Furthermore, differences in thread behavior were noted; Mold's benchmarks passed the --no-fork flag to override default behavior, whereas Wild left the default setting for time measurement, only using --no-fork for memory consumption. To attempt to reproduce results similar to those obtained by Mold on an Apple M1 machine, the author standardized the configurations by setting the output file to ext4, deleting the file between runs, and applying the --no-fork flag. Initial results for specific programs like blender-debug, godot-debug, blender-release, and clang-release showed relatively comparable performance ratios between Wild and Mold, generally ranging from 0.7x to 1.3x. A deeper examination focused on the clang-release benchmark to understand the impact of configuration. By testing various combinations of filesystem types and file deletion policies, the results demonstrated that the configuration significantly altered the performance ratios. The author concluded that Wild performed best when it was permitted to fork and when the output file resided on tmpfs, contrary to the configuration used in Mold's benchmarks. This performance gap is attributed partly to Wild lacking the specific operating system optimizations implemented by Mold, such as using fallocate for space pre-allocation and hugepages for memory mapping. The author also observed that Mold has recently achieved considerable speed improvements, particularly in the clang-release benchmark, following the releases of Mold versions 2.42.0 and 2.42.1. While the author successfully replicated results similar to those on the M1 Mac, they acknowledged that replicating the performance observed on the Threadripper hardware was not possible due to hardware limitations. The author speculated that the substantial difference observed on the Threadripper system might be influenced by the difference in thread counts, as Wild historically operates with 128 threads while Mold operates with 32. The author noted an observation on their own 32-thread machine, indicating that Wild experiences marginal speed improvements as the thread count increases from 24 to 32, suggesting potential benefits from higher thread utilization. |