Build-tool benchmarks published by vendors use repositories chosen to show a difference. Yours is the only one that matters, and both a cold and a warm measurement are needed because CI mostly runs cold.
Terminal
# cold: no cache, the CI condition
rm -rf node_modules/.cache dist && time <tool> build
# warm: the local development condition
time <tool> build
# and the one people forget: incremental after a one-line change
echo "// touch" >> src/index.ts && time <tool> build
Lefthook configures hooks in YAML, runs them in parallel, and ships as one dependency-free binary, making it quick and language-agnostic. pre-commit, written in Python, manages isolated hook environments and offers a huge ecosystem of shareable hooks pinned by version, which is excellent for standardizing checks across repos.
In CI?
pre-commit shines when you want a curated, version-pinned set of community hooks reused across many repos, and it has a clean CI mode. Lefthook is faster and dependency-free, ideal when you mostly run your own commands and want parallelism. Both should also run in CI so checks are enforced beyond local hooks.
Speed it up?
Cache the hook environments (pre-commit) or dependencies so CI checks start warm. The checks run on runners; faster managed runners shorten hook and lint execution.
Which should I choose?
Wanting a large registry of shareable, version-pinned hooks standardized across repos: pre-commit. Wanting a fast, dependency-free binary running your own commands in parallel: Lefthook. Teams that value a shared hook catalog lean pre-commit; speed-focused ones lean Lefthook.