# pnpm vs Yarn: source lines of code compared

As of 2026-09-07, pnpm/pnpm contains 649,110 total lines (547,771 code) across 3,501 files, while yarnpkg/berry contains 137,547 total lines (104,439 code) across 1,243 files as of 2026-07-30. pnpm/pnpm is about 5.2x the size of yarnpkg/berry by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

| Metric | [pnpm/pnpm](https://octocounts.com/github/pnpm/pnpm) | [yarnpkg/berry](https://octocounts.com/github/yarnpkg/berry) |
| --- | ---: | ---: |
| Files | 3,501 | 1,243 |
| Total lines | 649,110 | 137,547 |
| Code lines | 547,771 | 104,439 |
| Comment lines | 42,398 | 11,728 |
| Blank lines | 58,941 | 21,380 |
| Languages counted | 12 | 12 |

Top languages in pnpm/pnpm: Rust (70.5% of code), TypeScript (17.5% of code), YAML (6.3% of code). Top languages in yarnpkg/berry: TypeScript (68.3% of code), JavaScript (22.1% of code), JSON (5.6% of code). TypeScript, JSON appear in both top language lists; Rust, YAML, TOML appear only in pnpm/pnpm's top languages; JavaScript, TSX, CSS appear only in yarnpkg/berry's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. pnpm/pnpm was counted at ref main (commit 8760cfa9f32a) on 2026-09-07; yarnpkg/berry was counted at ref master (commit 57081c05a398) on 2026-07-30. See the [counting methodology](https://octocounts.com/docs/methodology) for ignored directories and analysis options.
Evidence and next steps:

- [pnpm/pnpm SLOC report](https://octocounts.com/github/pnpm/pnpm)
- [yarnpkg/berry SLOC report](https://octocounts.com/github/yarnpkg/berry)
- [Compare pnpm/pnpm and yarnpkg/berry interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2Fpnpm%2Fpnpm&right=https%3A%2F%2Fgithub.com%2Fyarnpkg%2Fberry)

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, pnpm/pnpm or yarnpkg/berry?

pnpm/pnpm has more code: 547,771 code lines versus 104,439 for yarnpkg/berry, about 5.2x as much, based on cached OctoCounts reports as of 2026-09-07.

### 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 pnpm/pnpm, yarnpkg/berry, or any repository.

### How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. pnpm/pnpm was counted at ref main (commit 8760cfa9f32a) on 2026-09-07; yarnpkg/berry was counted at ref master (commit 57081c05a398) on 2026-07-30. 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)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [OctoCounts API docs](https://octocounts.com/docs/api)
