proomt

Search

Search posts, papers, and topics

All posts

CodeshipElectric bee4 min readintermediate

Makefile performance: built-in rules

Summary

GNU Make scans every built‑in implicit rule for each target, adding unnecessary overhead. Using the -r (or --no-builtin-rules) flag disables this scanning and can speed up large or no‑op builds by up to ~30%.

  • Add -r or --no-builtin-rules to GNU Make to skip all built‑in implicit rules
  • Disabling built‑ins cut a 15k‑file build from 60.2 s to 42.9 s (≈28 % faster) and a no‑op build from 6.0 s to 5.2 s
  • If you still need specific built‑in rules, define them explicitly in the makefile and keep -r enabled
  • List built‑in rules with gmake -p; they appear marked as "built-in"

Anyone using GNU Make for sizable or frequent builds should consider disabling built‑in rules to reduce build time overhead.

6/10

Related reading

  1. Pros and Cons of Unified Build

    Unified (jumbo) builds concatenate multiple C++ source files to reduce header instantiation, often halving cold compile time. However, they hurt incremental rebuilds, cache efficiency, and can change program semantics, making reproducibility and correctness harder.

    Mozilla Automation Teamgithub.io8 minHN1
  2. Audit your Agent files

    Agent configuration files (CLAUDE.md, AGENTS.md, skill packs) accumulate stale rules, inflating token usage and hurting performance. Regular audits—using Claude’s /doctor, pruning to <200 lines, and encoding hard constraints in hooks—restore lean, effective agents.

    Addy Osmaniaddyosmani.com12 min