GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - hckhanh/js-utils-benchmark: Bundle-size, perf, tree-shaking & DX comparison of 7 JS utility libs (lodash, lodash-es, es-toolkit, radashi, remeda, rambda, moderndash). Bun + mitata.

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
results
results
 
 
src
src
 
 
.gitignore
.gitignore
 
 
CLAUDE.md
CLAUDE.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
REPORT.md
REPORT.md
 
 
bun.lock
bun.lock
 
 
index.ts
index.ts
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

js-utils-benchmark

License: MIT Bun mitata

Bundle-size, performance, tree-shaking and DX comparison of seven JavaScript utility libraries โ€” lodash, lodash-es, es-toolkit, radashi, remeda, rambda, moderndash.

๐Ÿ“Š Read the full report โ†’ REPORT.md


TL;DR

Concern Winner
๐Ÿ“ฆ Smallest whole-lib (gzip) moderndash (4.8 KB) โ†’ rambda (6.1 KB) โ†’ es-toolkit (9.2 KB)
๐Ÿ“ฆ Smallest realistic 5-fn app moderndash (702 B) โ†’ radashi (850 B)
โšก Most perf wins (12 benches) moderndash (4) โ†’ es-toolkit / radashi (3 each)
๐ŸŒณ Best tree-shaking es-toolkit, radashi, remeda, rambda, moderndash (all โœ…)
๐Ÿ”ค TypeScript-first es-toolkit, remeda, radashi, moderndash
๐Ÿ›๏ธ Drop-in lodash compat lodash (still) or es-toolkit/compat
๐Ÿ“ˆ Adoption (npm DL/wk) lodash (149 M) โ†’ lodash-es (33 M) โ†’ es-toolkit (23 M)

Full numbers, methodology, and per-function breakdowns in REPORT.md.


What it measures

  1. Performance โ€” mitata 1.0 micro-benchmarks across 12 common functions (chunk, groupBy, uniq, cloneDeep, isEqual, pick, omit, difference, intersection, camelCase, get, debounce).
  2. Bundle size โ€” single-function imports + 5-function realistic-app scenario, minified by Bun.build, then gzip / brotli / zstd.
  3. Tree-shaking โ€” single-fn-bundle รท whole-lib-bundle ratio.
  4. DX & quality โ€” TypeScript types, ESM/CJS, exports map, sideEffects flag, dependency count, FP style, public-function count.
  5. Ecosystem โ€” GitHub stars/forks/issues + npm weekly downloads.

Requirements

  • Bun โ‰ฅ 1.3
  • macOS / Linux / Windows (any platform Bun runs on)
  • (Optional) gh CLI for refreshing ecosystem data

Quick start

git clone https://github.com/hckhanh/js-utils-benchmark.git
cd js-utils-benchmark
bun install
bun run all          # โ‰ˆ 5 min โ€” runs everything โ†’ REPORT.md

Or piecewise:

bun run quality      # โ†’ results/quality.json
bun run bundle       # โ†’ results/bundle.json + bundle-realistic.json
bun run bench        # โ†’ results/bench.json (slow, ~3 min)
bun run report       # โ†’ REPORT.md

Layout

src/
  data.ts                     shared test fixtures
  benchmarks/run.ts           mitata perf suite (12 fns ร— 7 libs)
  bundle/measure.ts           per-fn raw / min / gzip / brotli / zstd
  bundle/realistic.ts         5-fn "real app" scenario
  quality/score.ts            DX matrix from package.json + types walk
  report.ts                   stitches every JSON โ†’ REPORT.md
results/                      raw outputs (json, committed)
REPORT.md                     final report

Refreshing ecosystem data

results/ecosystem.json (GitHub stats + npm downloads) is fetched manually:

gh api repos/<owner>/<repo> --jq '{stars:.stargazers_count, forks:.forks_count, openIssues:.open_issues_count, pushed:.pushed_at, lic:.license.spdx_id}'
curl -s https://api.npmjs.org/downloads/point/last-week/<pkg> | jq '.downloads'

Then bun run report re-renders.

Contributing

PRs welcome โ€” especially for:

  • Adding a new library to the matrix (just edit the seven LIBS arrays in src/{benchmarks,bundle,quality} and re-run).
  • Adding a missing function to the perf suite.
  • Re-running on a different machine and posting your numbers as an issue.

When adding a library:

  1. bun add <new-lib>
  2. Map its function names in src/bundle/measure.ts and src/benchmarks/run.ts (skip with "" if a fn isn't available โ€” the runner handles it).
  3. Add an entry to FP_STYLE in src/quality/score.ts and the LIBS order in src/report.ts.
  4. bun run all and commit the regenerated REPORT.md and results/*.json.

Methodology notes

  • Numbers are from a single Apple-silicon Mac running Bun 1.3.13. Re-run on your hardware for your bundler/runtime to get representative numbers.
  • mitata uses JIT-warmup + GC instrumentation and runs 4096 ops per sample. do_not_optimize prevents dead-code elimination.
  • rambda v11+ is fully auto-curried โ€” equals(a, b) returns a function; benchmarks use equals(a)(b) to actually compute.
  • radashi ships both clone (shallow) and cloneDeep โ€” the cloneDeep benchmark uses the deep one for fairness.

License

MIT ยฉ 2026 Khรกnh Hoร ng

About

Bundle-size, perf, tree-shaking & DX comparison of 7 JS utility libs (lodash, lodash-es, es-toolkit, radashi, remeda, rambda, moderndash). Bun + mitata.

github.com/hckhanh/js-utils-benchmark#readme

Topics

benchmarkbunbundle-sizees-toolkitjavascriptlodashmitatamoderndashperformanceradashirambdaremedatree-shakingtypescriptutility-library

Resources

Readme
MIT license

Contributing

Contributing
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.