hn.today

Benchmarking Wild vs. Mold

davidlattimore.github.io21 points0 comments
Screenshot of Benchmarking Wild vs. Mold

An investigation compares two linkers, Wild and Mold, after Mold's updated benchmarks reported Wild as substantially slower. The analysis pinpoints methodological differences that explain most of the divergence: different hardware (64-core Threadripper and M1 Ultra vs a 16-core Ryzen), filesystem and output-file handling (Mold used ext4 and deleted the output between runs while Wild historically used tmpfs and left the file in place), and the use of --no-fork (Mold) versus forking by default (Wild). Reproducing Mold-like conditions (ext4 + delete + --no-fork) on an M1-class machine produces similar Wild/Mold ratios: blender-debug ~1.2x slower for Wild, godot-debug ~1.2-1.3x, blender-release slightly faster on Wild, and clang-release essentially equal.

Focused experiments on clang-release across configurations show Wild performs best when allowed to fork and when the output already exists on tmpfs (example: tmpfs + no-delete + fork yielded Wild 0.11s vs Mold 0.19s), while ext4 + delete + --no-fork yields near parity. The main technical deficit in Wild was missing OS-specific optimizations Mold uses for new-file creation and mapping (fallocate pre-allocation and hugepage mappings); those optimizations have been implemented in Wild and will appear in the next release. Mold also gained substantial speedups in versions 2.42.x after Wild’s August benchmarks, and remaining large discrepancies on the 64-core machine likely reflect differing thread counts. The conclusion: benchmark configuration, filesystem behavior, OS-level tweaks, and recent releases explain the reported differences.

Read on davidlattimore.github.io0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.