ripgrep vs fd: source lines of code compared

The ripgrep vs fd comparison on OctoCounts shows side-by-side source line counts for BurntSushi/ripgrep and sharkdp/fd, 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 BurntSushi/ripgrep and sharkdp/fd 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-13, BurntSushi/ripgrep contains 46,567 total lines (35,349 code) across 128 files, while sharkdp/fd contains 7,402 total lines (4,680 code) across 37 files as of 2026-11-14. BurntSushi/ripgrep has about 7.6x the counted code lines of sharkdp/fd 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.

MetricBurntSushi/ripgrepsharkdp/fd
Files12837
Total lines46,5677,402
Code lines35,3494,680
Comment lines6,2671,492
Blank lines4,9511,230
Languages counted108

Top languages in BurntSushi/ripgrep: Rust (92.4% of code), Python (3.2% of code), YAML (1.8% of code). Top languages in sharkdp/fd: Rust (92.8% of code), Shell (3.3% of code), TOML (2.0% of code). Rust, TOML appear in both top language lists; Python, YAML, Zsh appear only in BurntSushi/ripgrep's top languages; Shell, Makefile, AWK appear only in sharkdp/fd's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. BurntSushi/ripgrep was counted at ref c1fc6a5eb8c971fc43041d3df34cf8bd49f31032 (commit c1fc6a5eb8c9) on 2026-11-13; sharkdp/fd was counted at ref master (commit 6cf330283cfd) on 2026-11-14. 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. BurntSushi/ripgrep: 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. sharkdp/fd: 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: BurntSushi/ripgrep is the ripgrep repository: the line-oriented search tool written in Rust, with its supporting crates for regex handling and its test corpora. sharkdp/fd is the fd repository: the file-finding tool, also written in Rust. Both are single-purpose command-line tools, making this one of the cleaner like-for-like comparisons on the site, counted on the dates in the methodology line.

Both codebases are Rust-dominant in the per-language tables, so the difference in totals reflects what each tool takes on rather than how it is written: ripgrep carries its own search and regex machinery in-tree, while fd builds on shared crate dependencies for directory traversal and ignore-file handling.

The totals do not measure search speed or memory use in your working directory; those depend on the query, the file set, and the installed versions. A smaller or larger repository here says nothing about which finds files faster.

Sources: BurntSushi/ripgrep repository · sharkdp/fd repository. Statements verified 2026-09-16.

Evidence and next steps:

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, BurntSushi/ripgrep or sharkdp/fd?

As of 2026-11-13, BurntSushi/ripgrep contains 46,567 total lines (35,349 code) across 128 files, while sharkdp/fd contains 7,402 total lines (4,680 code) across 37 files as of 2026-11-14. BurntSushi/ripgrep has about 7.6x the counted code lines of sharkdp/fd 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 BurntSushi/ripgrep, sharkdp/fd, or any repository.

How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. BurntSushi/ripgrep was counted at ref c1fc6a5eb8c971fc43041d3df34cf8bd49f31032 (commit c1fc6a5eb8c9) on 2026-11-13; sharkdp/fd was counted at ref master (commit 6cf330283cfd) on 2026-11-14. 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.