# 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 with the same engine and analysis options on the dates shown in the methodology line: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

As of 2026-09-17, oven-sh/bun contains 1,964,876 total lines (1,469,308 code) across 4,091 files, while nodejs/node contains 12,549,211 total lines (9,933,725 code) across 18,430 files as of 2026-09-16. nodejs/node is about 6.8x the size of oven-sh/bun by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

| Metric | [oven-sh/bun](https://octocounts.com/github/oven-sh/bun) | [nodejs/node](https://octocounts.com/github/nodejs/node) |
| --- | ---: | ---: |
| Files | 4,091 | 18,430 |
| Total lines | 1,964,876 | 12,549,211 |
| Code lines | 1,469,308 | 9,933,725 |
| Comment lines | 333,658 | 1,401,721 |
| Blank lines | 161,910 | 1,213,765 |
| Languages counted | 12 | 12 |

Top languages in oven-sh/bun: Rust (54.0% of code), C (13.6% of code), C++ (11.1% of code). Top languages in nodejs/node: C Header (20.9% of code), GNU Style Assembly (19.1% 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 b52d5134815d) on 2026-09-17; nodejs/node was counted at ref edc61b14de8e72af563a69b4356543717e1c235e (commit edc61b14de8e) on 2026-09-16. See the [counting methodology](https://octocounts.com/docs/methodology) for ignored directories and analysis options.
## About this comparison

oven-sh/bun counts 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 counts 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 counts 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.

Both repositories include the runtime's standard library and its tests, not just the native core, so the totals cover the same conceptual layer even though the engines they build on (JavaScriptCore and V8) live in neither repository.

_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](https://github.com/oven-sh/bun) · [nodejs/node repository](https://github.com/nodejs/node). Statements verified 2026-09-16.

Evidence and next steps:

- [oven-sh/bun SLOC report](https://octocounts.com/github/oven-sh/bun)
- [nodejs/node SLOC report](https://octocounts.com/github/nodejs/node)
- [Compare oven-sh/bun and nodejs/node interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2Foven-sh%2Fbun&right=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode)

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?

nodejs/node has more code: 9,933,725 code lines versus 1,469,308 for oven-sh/bun, about 6.8x as much, based on cached OctoCounts reports as of 2026-09-17.

### 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 b52d5134815d) on 2026-09-17; nodejs/node was counted at ref edc61b14de8e72af563a69b4356543717e1c235e (commit edc61b14de8e) on 2026-09-16. 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.

## Related OctoCounts pages

- [Interactive repository comparison](https://octocounts.com/compare)
- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [OctoCounts API docs](https://octocounts.com/docs/api)
