Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Benchmarks

Fastmash is faster than GNU datamash on quantiles, grouped summaries and number-heavy tables. These Linux benchmarks compare both programs on an Intel laptop and an AMD desktop, using gene annotations, wine measurements and synthetic tables.

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× 6× Exon-count quantiles (RefGene) Exon-count quantiles (RefGene), Intel laptop, native Linux: GNU 111.0 ms, Fastmash 21.5 ms 5.2× Exon-count quantiles (RefGene), AMD desktop, native Linux: GNU 60.0 ms, Fastmash 12.6 ms 4.8× Transcripts per gene (RefGene) Transcripts per gene (RefGene), Intel laptop, native Linux: GNU 110.8 ms, Fastmash 73.0 ms 1.5× Transcripts per gene (RefGene), AMD desktop, native Linux: GNU 57.0 ms, Fastmash 37.9 ms 1.5× Exon statistics per gene (RefGene) Exon statistics per gene (RefGene), Intel laptop, native Linux: GNU 157.8 ms, Fastmash 86.8 ms 1.8× Exon statistics per gene (RefGene), AMD desktop, native Linux: GNU 74.8 ms, Fastmash 45.0 ms 1.7× Many small groups (genes) Many small groups (genes), Intel laptop, native Linux: GNU 159.8 ms, Fastmash 127.1 ms 1.3× Many small groups (genes), AMD desktop, native Linux: GNU 66.1 ms, Fastmash 53.1 ms 1.2× Gene example (datamash manual) Gene example (datamash manual), Intel laptop, native Linux: GNU 7.0 ms, Fastmash 4.2 ms 1.7× Gene example (datamash manual), AMD desktop, native Linux: GNU 3.3 ms, Fastmash 2.1 ms 1.6× Sum and mean, 1M decimals Sum and mean, 1M decimals, Intel laptop, native Linux: GNU 325.4 ms, Fastmash 87.5 ms 3.7× Sum and mean, 1M decimals, AMD desktop, native Linux: GNU 114.8 ms, Fastmash 37.2 ms 3.1× Sum and mean, 100k decimals Sum and mean, 100k decimals, Intel laptop, native Linux: GNU 32.8 ms, Fastmash 9.5 ms 3.5× Sum and mean, 100k decimals, AMD desktop, native Linux: GNU 11.6 ms, Fastmash 3.9 ms 3.0× Grouped decimals, 100k rows Grouped decimals, 100k rows, Intel laptop, native Linux: GNU 68.1 ms, Fastmash 38.7 ms 1.8× Grouped decimals, 100k rows, AMD desktop, native Linux: GNU 27.5 ms, Fastmash 18.0 ms 1.5× One dominant group One dominant group, Intel laptop, native Linux: GNU 21.6 ms, Fastmash 9.1 ms 2.4× One dominant group, AMD desktop, native Linux: GNU 9.3 ms, Fastmash 3.9 ms 2.4× Wine quality by grade Wine quality by grade, Intel laptop, native Linux: GNU 6.0 ms, Fastmash 2.6 ms 2.3× Wine quality by grade, AMD desktop, native Linux: GNU 3.0 ms, Fastmash 1.2 ms 2.5× Large sorted summary Large sorted summary, Intel laptop, native Linux: GNU 547.2 ms, Fastmash 495.1 ms 1.1× Large sorted summary, AMD desktop, native Linux: GNU 204.4 ms, Fastmash 240.2 ms 0.9× Times faster than GNU datamash 1.9, by median elapsed time. The dashed line is the same speed; shorter bars are slower.

Large sorted summaries can be slower than GNU datamash.

Longer bars mean faster runs. The dashed line marks equal speed. See the method and timings for the commands, elapsed times and machines.

The animated demo replays the laptop’s RefGene quartile job. Playback is slowed 20 times so that both runs are visible. Its clocks show the measured times.

Run them yourself

The benchmark kit runs eight of these jobs on your machine with both programs, checks that they agree, and prints a table you can share:

curl -fsSLO https://raw.githubusercontent.com/pederbe/fastmash/main/bench/fastmash-bench.py
python3 fastmash-bench.py

The best benchmark is your own job. Compare both programs on your data:

export LC_ALL=C.UTF-8
time datamash -s -g 1 median 2 < your-data.tsv > /dev/null
time fastmash -s -g 1 median 2 < your-data.tsv > /dev/null

For stable numbers, repeat each command several times, alternate the two programs, and use a quiet machine. hyperfine does this for you:

hyperfine --warmup 2 \
  'datamash -s -g 1 median 2 < your-data.tsv' \
  'fastmash -s -g 1 median 2 < your-data.tsv'

If Fastmash is slower on a job you care about, please tell us: slow real-world jobs are what we optimize next.