Bun vs Node.js: source lines of code compared
The Bun vs Node.js comparison on OctoCounts shows side-by-side source line counts for oven-sh/bun and nodejs/node, counted under the rules and on the dates stated below: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.
This page compares the source lines of code (SLOC) of oven-sh/bun and nodejs/node using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.
As of 2026-11-25, oven-sh/bun contains 3,307,538 total lines (2,725,048 code) across 7,727 files, while nodejs/node contains 13,449,808 total lines (10,583,461 code) across 21,968 files as of 2026-11-24. nodejs/node has about 3.9x the counted code lines of oven-sh/bun under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.
| Metric | oven-sh/bun | nodejs/node |
|---|---|---|
| Files | 7,727 | 21,968 |
| Total lines | 3,307,538 | 13,449,808 |
| Code lines | 2,725,048 | 10,583,461 |
| Comment lines | 338,112 | 1,503,443 |
| Blank lines | 244,378 | 1,362,904 |
| Languages counted | 33 | 54 |
Top languages in oven-sh/bun: Rust (71.5% of code), TypeScript (8.0% of code), C++ (7.2% of code). Top languages in nodejs/node: C Header (23.5% of code), GNU Style Assembly (18.6% of code), Perl (17.5% of code). C++, C appear in both top language lists; Rust, TypeScript, JavaScript appear only in oven-sh/bun's top languages; C Header, GNU Style Assembly, Perl appear only in nodejs/node's top languages.
Methodology: both counts come from cached OctoCounts reports generated with tokei. oven-sh/bun was counted at ref main (commit 0966e99d8f35) on 2026-11-25; nodejs/node was counted at ref main (commit a055d9f2ccda) on 2026-11-24. See the counting methodology for ignored directories and analysis options.
Both reports use the same engine and effective counting rules. Repository declarations, when enabled, are specific to each repository. oven-sh/bun: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed. nodejs/node: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.
About this comparison
Background observations recorded on 2026-09-16; language descriptions here are historical context, not claims about the current filtered shares. Use this page's measured language breakdown for current counts. Repository layout before counting filters: oven-sh/bun is the Bun repository: the JavaScript/TypeScript runtime and toolkit, written predominantly in Zig with C++ components, on top of the JavaScriptCore engine it builds against. nodejs/node is the Node.js repository: the runtime built on V8, with its C++ core, JavaScript standard library, and test suites. Both are JavaScript runtime source trees, but the per-language tables show different implementation languages, and both repositories were taken on the dates above.
The language split is the headline of this comparison: Bun's counted code is predominantly Zig, while Node.js's is predominantly C++ with a large JavaScript layer — each project's chosen implementation language for the same job of hosting JavaScript.
Repository size says nothing about runtime speed, memory use, or compatibility with existing packages — those are properties of the shipped runtimes, and both projects change quickly. Treat the counts as a measure of each source tree's reading and maintenance surface.
Sources: oven-sh/bun repository · nodejs/node repository. Statements verified 2026-09-16.
Evidence and next steps:
- oven-sh/bun SLOC report
- nodejs/node SLOC report
- Compare oven-sh/bun and nodejs/node interactively
- oven-sh/bun saved report
- nodejs/node saved report
Saved reports remain subject to cache cleanup and replacement. Export their JSON for durable citation; live report URLs can change.
Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.
Compare FAQ
Which has more lines of code, oven-sh/bun or nodejs/node?
As of 2026-11-25, oven-sh/bun contains 3,307,538 total lines (2,725,048 code) across 7,727 files, while nodejs/node contains 13,449,808 total lines (10,583,461 code) across 21,968 files as of 2026-11-24. nodejs/node has about 3.9x the counted code lines of oven-sh/bun under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.
Does more source lines of code mean more complexity?
Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for oven-sh/bun, nodejs/node, or any repository.
How is this comparison calculated?
Methodology: both counts come from cached OctoCounts reports generated with tokei. oven-sh/bun was counted at ref main (commit 0966e99d8f35) on 2026-11-25; nodejs/node was counted at ref main (commit a055d9f2ccda) on 2026-11-24. See the counting methodology for ignored directories and analysis options.
Can I compare a different branch, tag, or commit?
Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.