Rust-powered statistics for text and CSV

Fast statistics.
Smarter tables.

The datamash commands you already know, with quoted CSV, weighted means and complete-record selection. Inspect table health. Compare datasets. Get the same numbers on every supported machine.

Over 70 operations and modes · 4.2× on RefGene quartiles, see benchmark details below

curl -fsSL https://fastmash.io/install.sh | sh

Installs the latest release into ~/.local/bin after checking its checksum.

Linux and WSL2 · macOS 15+ · installation details

fastmash · terminal
$ fastmash --help
Operations:
  sum       Sum the selected field
  mean      Arithmetic mean of the selected field
  wmean     Weighted mean of a VALUE:WEIGHT field pair
  … help excerpt …

$ fastmash --csv -H -s -g region \
    --result-name=1:total sum revenue < sales.csv
GroupBy(region),total
east,4
"west,coast",8
$ 
Readable help in color. Clean data for the next step in your pipeline.

From raw exports to useful answers

More of your workflow, in one command

Keep familiar field selectors and grouping. Add the tools that make daily table work easier.

CSV in. Named results out.

Read quoted fields with commas and line breaks. Write CSV reports with stable column names, grouping and weighted means.

fastmash --csv -H -s -g region \
  --result-name=1:average \
  wmean price:units < sales.csv
CSV and result names

Understand your table.

See widths, missing values and mixed types. Validate the rules you supply, or keep the highest and lowest complete records with stable ties.

fastmash --header-in health \
  type price number \
  nonmissing id validate < sales.tsv
Table health Highest and lowest records

See what changed.

Align summaries from two datasets, even when headers move. Rank absolute or percentage changes, with added and removed keys still visible.

fastmash --csv -H -g region \
  compare before.csv after.csv \
  rank 1 percent limit 10 sum revenue
Dataset comparison

4.2× on RefGene quartiles

Speed relative to GNU datamash 1.9 on selected core jobs. Two native Linux machines, the same data and output, exact release binaries.

How many times faster Fastmash is than GNU datamash on the core jobs, per host Intel laptop, native Linux AMD desktop, native Linux 0× 1× 2× 3× 4× 5× Exon-count quantiles (RefGene) Exon-count quantiles (RefGene), Intel laptop, native Linux: GNU 112.8 ms, Fastmash 26.6 ms 4.2× Exon-count quantiles (RefGene), AMD desktop, native Linux: GNU 50.3 ms, Fastmash 13.1 ms 3.8× Transcripts per gene (RefGene) Transcripts per gene (RefGene), Intel laptop, native Linux: GNU 112.0 ms, Fastmash 61.0 ms 1.8× Transcripts per gene (RefGene), AMD desktop, native Linux: GNU 45.6 ms, Fastmash 26.5 ms 1.7× Exon statistics per gene (RefGene) Exon statistics per gene (RefGene), Intel laptop, native Linux: GNU 159.4 ms, Fastmash 83.1 ms 1.9× Exon statistics per gene (RefGene), AMD desktop, native Linux: GNU 62.2 ms, Fastmash 36.5 ms 1.7× Many small groups (genes) Many small groups (genes), Intel laptop, native Linux: GNU 160.4 ms, Fastmash 105.0 ms 1.5× Many small groups (genes), AMD desktop, native Linux: GNU 55.0 ms, Fastmash 38.7 ms 1.4× Gene example (datamash manual) Gene example (datamash manual), Intel laptop, native Linux: GNU 7.3 ms, Fastmash 3.8 ms 1.9× Gene example (datamash manual), AMD desktop, native Linux: GNU 3.0 ms, Fastmash 1.6 ms 1.9× Sum and mean, 1M decimals Sum and mean, 1M decimals, Intel laptop, native Linux: GNU 324.7 ms, Fastmash 122.5 ms 2.7× Sum and mean, 1M decimals, AMD desktop, native Linux: GNU 105.9 ms, Fastmash 46.8 ms 2.3× Sum and mean, 100k decimals Sum and mean, 100k decimals, Intel laptop, native Linux: GNU 36.8 ms, Fastmash 14.6 ms 2.5× Sum and mean, 100k decimals, AMD desktop, native Linux: GNU 10.9 ms, Fastmash 5.3 ms 2.1× Grouped decimals, 100k rows Grouped decimals, 100k rows, Intel laptop, native Linux: GNU 69.9 ms, Fastmash 38.5 ms 1.8× Grouped decimals, 100k rows, AMD desktop, native Linux: GNU 25.6 ms, Fastmash 14.8 ms 1.7× One dominant group One dominant group, Intel laptop, native Linux: GNU 21.9 ms, Fastmash 11.9 ms 1.8× One dominant group, AMD desktop, native Linux: GNU 9.0 ms, Fastmash 4.5 ms 2.0× Wine quality by grade Wine quality by grade, Intel laptop, native Linux: GNU 6.4 ms, Fastmash 3.2 ms 2.0× Wine quality by grade, AMD desktop, native Linux: GNU 2.8 ms, Fastmash 1.4 ms 2.0× Large sort with disk spill Large sort with disk spill, Intel laptop, native Linux: GNU 572.4 ms, Fastmash 694.1 ms 0.8× Large sort with disk spill, AMD desktop, native Linux: GNU 180.0 ms, Fastmash 309.7 ms 0.6× Times faster than GNU datamash 1.9, by median elapsed time. The dashed line is the same speed; shorter bars are slower. 0.1.0 release binary 1f1fec94, 2026-10-05/06

* Six named host/job comparisons are slower: disk-spilling sorts, Intel many keys and Intel distinct-value geometric mean. Three further comparisons are inconclusive. All results and the method

And better in other ways

Portable arithmetic, built-in locale data and clear handling of inputs that GNU datamash 1.9 cannot safely process.

GNU datamash 1.9Fastmash
Results Depend on the CPU and the C math library Identical on every machine: all arithmetic in software
Locales Need locale data installed; silently fall back to C without it Built in: numbers in 318 locales, sorting in 194
perc:100 Can read past the end of the values Returns the largest value
rmdup on several keys Crashes on an assertion A clear refusal
Malformed parameters such as strbin:2.0 Misleading errors or undefined behavior An accurate error message
crosstab labels over 511 bytes Truncated Kept in full

All differences from GNU datamash

Keep the commands you know

GNU datamash's operations, options, field selectors, grouping and headers. Most scripts can switch by changing the program name; the migration guide covers the documented differences.

Migrating from datamash
- datamash -t, -s -g 1 mean 3 sstdev 3 < sales.csv
+ fastmash -t, -s -g 1 mean 3 sstdev 3 < sales.csv