This page compares the source lines of code (SLOC) of cockroachdb/cockroach and yugabyte/yugabyte-db 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-08-26, cockroachdb/cockroach contains 4,182,809 total lines (3,085,053 code) across 12,785 files, while yugabyte/yugabyte-db contains 6,551,516 total lines (4,654,940 code) across 17,804 files as of 2026-08-27. yugabyte/yugabyte-db is about 1.5x the size of cockroachdb/cockroach by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.
| Metric | cockroachdb/cockroach | yugabyte/yugabyte-db |
|---|---|---|
| Files | 12,785 | 17,804 |
| Total lines | 4,182,809 | 6,551,516 |
| Code lines | 3,085,053 | 4,654,940 |
| Comment lines | 698,670 | 1,134,718 |
| Blank lines | 399,086 | 761,858 |
| Languages counted | 12 | 12 |
Top languages in cockroachdb/cockroach: Go (84.1% of code), JSON (4.0% of code), YAML (3.3% of code). Top languages in yugabyte/yugabyte-db: C (26.7% of code), C++ (16.0% of code), SQL (8.4% of code). Go, JSON, YAML, Bazel, TSX appear only in cockroachdb/cockroach's top languages; C, C++, SQL, Java, Rust appear only in yugabyte/yugabyte-db's top languages.
Methodology: both counts come from cached OctoCounts reports generated with tokei. cockroachdb/cockroach was counted at ref master (commit 8812064a015d) on 2026-08-26; yugabyte/yugabyte-db was counted at ref master (commit daa8bac23494) on 2026-08-27. See the counting methodology for ignored directories and analysis options.
Evidence and next steps:
Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.
yugabyte/yugabyte-db has more code: 4,654,940 code lines versus 3,085,053 for cockroachdb/cockroach, about 1.5x as much, based on cached OctoCounts reports as of 2026-08-27.
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 cockroachdb/cockroach, yugabyte/yugabyte-db, or any repository.
Methodology: both counts come from cached OctoCounts reports generated with tokei. cockroachdb/cockroach was counted at ref master (commit 8812064a015d) on 2026-08-26; yugabyte/yugabyte-db was counted at ref master (commit daa8bac23494) on 2026-08-27. See the counting methodology for ignored directories and analysis options.
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.