fg-labs/bwa-mem3

Accelerated short-read alignment, derived from bwa-mem2 — drop-in replacement with correctness fixes, performance improvements, single-binary methylation, and shared-memory index.

C++

52

732 commits

updated Oct 14, 2026

See the code

README

bwa-mem3

CI codecov Bioconda Documentation License

bwa-mem3 is a short-read aligner derived from bwa-mem2, carrying correctness fixes, performance improvements, and new features (methylation alignment, shared-memory index, mimalloc allocator) maintained by Fulcrum Genomics.

Performance

Wall-clock speedup of the current release (v0.14.0*) against bwa 0.7.19, bwa-mem2 v2.2.1, and minibwa, on the wgs-5M sample. Cells are stock / --fast.

archwall_svs bwavs bwa-mem2vs minibwa
ARM42.23 / 18.085.69x / 13.30x—0.96x / 2.24x
x8624.15 / 13.078.07x / 14.91x3.52x / 6.51x1.26x / 2.32x

* v0.14.0, like v0.13.0, is measured with a denser suffix-array index — stride 2 instead of the stock stride 8 — built with bwa-mem3 re-sa -u 1 (or staged with bwa-mem3 shm -u 1), both new in v0.13.0. Output is byte-identical by construction (each added suffix-array sample is computed from the on-disk ones), and measured so: a full-content fgumi compare bams of wgs-5M (10,030,558 records) aligned on the stride-2 index against the stock stride-8 index — v0.13.0 against the output-identical v0.12.0 — found 0 differences on both benchmark hosts, Graviton4 m8g (NEON) and AMD m8a (AVX-512), and the change that added it (#510) found 0 differences on 5M-pair hg38 WGS and WES slices. It costs ~12 GB more memory for the human genome. Both v0.13.0 and v0.14.0 are measured on it in the tables below, so v0.14.0's vs prev is a like-for-like comparison. Every older release and every comparator uses the stock index.

[!TIP] 📈 Full release-history table — every bwa-mem3 release since v0.2.1, full methodology, and version pins.

Click to expand

Graviton4 (m8g, arm64/NEON)

releasewall_svs bwavs bwa-mem2vs minibwavs prev
bwa240.381.00x—0.17x—
bwa-mem2—————
minibwa40.595.92x—1.00x—
v0.2.1120.541.99x—0.34x—
v0.2.2122.731.96x—0.33x0.982x
v0.3.0102.112.35x—0.40x1.202x
v0.4.0104.142.31x—0.39x0.980x
v0.5.0104.47 / 37.232.30x / 6.46x—0.39x / 1.09x0.997x
v0.6.097.69 / 36.592.46x / 6.57x—0.42x / 1.11x1.069x / 1.017x
v0.7.092.06 / 39.782.61x / 6.04x—0.44x / 1.02x1.061x / 0.920x
v0.8.076.34 / 28.333.15x / 8.48x—0.53x / 1.43x1.206x / 1.404x
v0.9.076.65 / 28.343.14x / 8.48x—0.53x / 1.43x0.996x / 1.000x
v0.10.071.11 / 27.803.38x / 8.65x—0.57x / 1.46x1.078x / 1.020x
v0.11.064.32 / 26.303.74x / 9.14x—0.63x / 1.54x1.106x / 1.057x
v0.12.058.68 / 19.224.10x / 12.51x—0.69x / 2.11x1.096x / 1.369x
v0.13.0*55.02 / 18.734.37x / 12.84x—0.74x / 2.17x1.066x / 1.026x
v0.14.0*42.23 / 18.085.69x / 13.30x—0.96x / 2.24x1.303x / 1.036x

AMD (m8a, x86-64/AVX-512)

releasewall_svs bwavs bwa-mem2vs minibwavs prev
bwa194.941.00x0.44x0.16x—
bwa-mem285.042.29x1.00x0.36x—
minibwa30.366.42x2.80x1.00x—
v0.2.156.633.44x1.50x0.54x1.502x
v0.2.253.063.67x1.60x0.57x1.067x
v0.3.051.303.80x1.66x0.59x1.034x
v0.4.051.493.79x1.65x0.59x0.996x
v0.5.051.44 / 22.843.79x / 8.53x1.65x / 3.72x0.59x / 1.33x1.001x
v0.6.050.03 / 22.343.90x / 8.73x1.70x / 3.81x0.61x / 1.36x1.028x / 1.023x
v0.7.048.34 / 22.314.03x / 8.74x1.76x / 3.81x0.63x / 1.36x1.035x / 1.001x
v0.8.043.37 / 18.694.49x / 10.43x1.96x / 4.55x0.70x / 1.62x1.115x / 1.194x
v0.9.043.29 / 18.174.50x / 10.73x1.96x / 4.68x0.70x / 1.67x1.002x / 1.028x
v0.10.042.82 / 18.164.55x / 10.73x1.99x / 4.68x0.71x / 1.67x1.011x / 1.001x
v0.11.041.77 / 17.644.67x / 11.05x2.04x / 4.82x0.73x / 1.72x1.025x / 1.030x
v0.12.032.59 / 14.645.98x / 13.31x2.61x / 5.81x0.93x / 2.07x1.282x / 1.205x
v0.13.0*29.83 / 13.656.54x / 14.28x2.85x / 6.23x1.02x / 2.22x1.093x / 1.073x
v0.14.0*24.15 / 13.078.07x / 14.91x3.52x / 6.51x1.26x / 2.32x1.235x / 1.045x

vs prev is the release-over-release speedup (prev_wall / this_wall, >1 = faster) vs the previous release on this same host, stock / --fast. The first release's predecessor is upstream bwa-mem2 — bwa-mem3 is its successor — so v0.2.1's vs prev is its speedup over bwa-mem2 (blank on ARM, where upstream has no build).

Version pins: bwa 0.7.19 · bwa-mem2 v2.2.1 · minibwa commit d6d9f87d (minibwa-0.7). "ARM" = Graviton4 m8g (arm64/NEON, no SMT); "x86" = AMD m8a (x86-64/AVX-512, no SMT). Both are the general-purpose siblings of the c8g/c8a hosts used through v0.12.0 — same CPU family, same core count, no SMT, but 4 GiB/vCPU instead of 2 so every historical arm fits in memory — so absolute times are not comparable with earlier versions of this table, only ratios within it. (The x86 arm replaced an earlier Intel c7i arm, which ran 16 vCPUs over 8 physical cores under 2-way SMT and so wasn't a real core-for-core match for Graviton's 16 real cores.) No ARM bwa-mem2 build exists, hence the blank cells there. Every arm for a given arch ran interleaved on one fixed on-demand host — 3 reps each, median wall-clock shown — so these are same-host comparisons, not medians pooled across separate runs. — means the release predates the comparator or predates --fast. * v0.13.0 and v0.14.0 rows use the stride-2 suffix-array index described above; all other rows use the stock stride-8 index. Regenerated at each release; see Benchmarks.

[!WARNING] --fast is not alignment-identical to the default preset — it trades some sensitivity/specificity at the extremes (repetitive/multi-mapping regions, low-MAPQ reads) for the speedup above. See "Three ways to run it" below before switching a production pipeline to it.

Three ways to run it — plain, --compat, --fast

bwa-mem3 has three alignment modes that differ in what alignments come out, not just in speed:

modewhere reads alignwhen to use
plain (default)bwa-mem2's alignments plus bonafide correctness fixes, with two extra tags (MQ:i, HN:i) and an enriched header. On the cells re-measured for release 0.7.1, the complete alignment-record stream (tags stripped) is byte-identical to bwa-mem2 v2.2.1 on wgs-5M/wes-5M/hic-1M (x86 c6a AVX2, with a c6a/c8g cross-arch check confirming the Arm c8g NEON build matches) — differing only by those additive tags and the header. Separately, a 1.07M-record HG00096 WGS slice shows zero diverging primary alignments (x86, primary-only; not part of the cross-arch or complete-stream checks).Migrating a pipeline, validating against bwa/bwa-mem2, or any new pipeline.
--compat=bwa-mem2 / --compat=bwa-memByte-for-byte identical alignment records to a specific upstream (bwa-mem2 v2.2.1 or bwa 0.7.19), @PG excluded and -t/-K matched. The two targets are not interchangeable.Diff-clean validation against an existing bwa/bwa-mem2 golden.
--fastFaster, and not record-compatible with the default: it reshuffles the low-confidence tail (~85% of the reads it re-places had MAPQ 0; the confident MAPQ-60 core moves on ≤0.5%, 0.011% on wgs-5M) while staying accuracy-neutral against golden truth (≤0.02 pp across the WGS and methylation sims). Figures from the benchmark release-validation cells (wgs-5M/wes-5M/panel-twist-5M at 5 M reads, hic-1M/sbx-1M at 1 M) across every SIMD tier (AVX2 c6a, AVX-512 c7a/c7i, NEON c7g/c8g; meth on m7i), each a .4xlarge host at -t 16, -K 160000000.High-throughput pipelines where you care about the confident, uniquely-mapped calls.

--compat is mutually exclusive with --fast (and with --meth and --proper-pair-from-emitted). See Alignment modes for the full side-by-side and Equivalence with bwa-mem2 for the field-by-field audit.

By default bwa-mem3 keeps bwa-mem2's command-line defaults, so it drops into an existing pipeline unchanged. For the fastest configuration — and what each recommended deviation from the bwa defaults trades for speed — see Settings profiles: bwa drop-in vs recommended.

Full documentation: https://bwa-mem3.readthedocs.io

Install

The recommended way to install bwa-mem3 is via bioconda:

mamba install -c bioconda bwa-mem3
bwa-mem3 version

Prebuilt packages are available for linux-64, linux-aarch64, and osx-arm64.

Build from source

git clone --recursive https://github.com/fg-labs/bwa-mem3.git
cd bwa-mem3
make
./bwa-mem3 version

See the installation guide for prerequisites and architecture-specific notes.

  • Benchmarks — published results for every release, and how they are measured
  • bwa-mem3-rs — Rust bindings for bwa-mem3
  • bioconda recipe — conda package on bioconda
  • fgumi — UMI-aware consensus and deduplication
  • bwa-mem2 — upstream project

License

MIT. See the License page in the docs.

Citation

Please cite the bwa-mem2 paper (Vasimuddin Md et al., IPDPS 2019). See the Citation page for BibTeX.

Issues / contributing

File issues and pull requests on fg-labs/bwa-mem3.

alignment
bioinformatics
bwa
bwa-mem2
genomics
methylation
short-read

fg-labs/bwa-mem3

Accelerated short-read alignment, derived from bwa-mem2 — drop-in replacement with correctness fixes, performance improvements, single-binary methylation, and shared-memory index.

C++

52

732 commits

updated Oct 14, 2026

See the code

README

bwa-mem3

CI codecov Bioconda Documentation License

bwa-mem3 is a short-read aligner derived from bwa-mem2, carrying correctness fixes, performance improvements, and new features (methylation alignment, shared-memory index, mimalloc allocator) maintained by Fulcrum Genomics.

Performance

Wall-clock speedup of the current release (v0.14.0*) against bwa 0.7.19, bwa-mem2 v2.2.1, and minibwa, on the wgs-5M sample. Cells are stock / --fast.

archwall_svs bwavs bwa-mem2vs minibwa
ARM42.23 / 18.085.69x / 13.30x—0.96x / 2.24x
x8624.15 / 13.078.07x / 14.91x3.52x / 6.51x1.26x / 2.32x

* v0.14.0, like v0.13.0, is measured with a denser suffix-array index — stride 2 instead of the stock stride 8 — built with bwa-mem3 re-sa -u 1 (or staged with bwa-mem3 shm -u 1), both new in v0.13.0. Output is byte-identical by construction (each added suffix-array sample is computed from the on-disk ones), and measured so: a full-content fgumi compare bams of wgs-5M (10,030,558 records) aligned on the stride-2 index against the stock stride-8 index — v0.13.0 against the output-identical v0.12.0 — found 0 differences on both benchmark hosts, Graviton4 m8g (NEON) and AMD m8a (AVX-512), and the change that added it (#510) found 0 differences on 5M-pair hg38 WGS and WES slices. It costs ~12 GB more memory for the human genome. Both v0.13.0 and v0.14.0 are measured on it in the tables below, so v0.14.0's vs prev is a like-for-like comparison. Every older release and every comparator uses the stock index.

[!TIP] 📈 Full release-history table — every bwa-mem3 release since v0.2.1, full methodology, and version pins.

Click to expand

Graviton4 (m8g, arm64/NEON)

releasewall_svs bwavs bwa-mem2vs minibwavs prev
bwa240.381.00x—0.17x—
bwa-mem2—————
minibwa40.595.92x—1.00x—
v0.2.1120.541.99x—0.34x—
v0.2.2122.731.96x—0.33x0.982x
v0.3.0102.112.35x—0.40x1.202x
v0.4.0104.142.31x—0.39x0.980x
v0.5.0104.47 / 37.232.30x / 6.46x—0.39x / 1.09x0.997x
v0.6.097.69 / 36.592.46x / 6.57x—0.42x / 1.11x1.069x / 1.017x
v0.7.092.06 / 39.782.61x / 6.04x—0.44x / 1.02x1.061x / 0.920x
v0.8.076.34 / 28.333.15x / 8.48x—0.53x / 1.43x1.206x / 1.404x
v0.9.076.65 / 28.343.14x / 8.48x—0.53x / 1.43x0.996x / 1.000x
v0.10.071.11 / 27.803.38x / 8.65x—0.57x / 1.46x1.078x / 1.020x
v0.11.064.32 / 26.303.74x / 9.14x—0.63x / 1.54x1.106x / 1.057x
v0.12.058.68 / 19.224.10x / 12.51x—0.69x / 2.11x1.096x / 1.369x
v0.13.0*55.02 / 18.734.37x / 12.84x—0.74x / 2.17x1.066x / 1.026x
v0.14.0*42.23 / 18.085.69x / 13.30x—0.96x / 2.24x1.303x / 1.036x

AMD (m8a, x86-64/AVX-512)

releasewall_svs bwavs bwa-mem2vs minibwavs prev
bwa194.941.00x0.44x0.16x—
bwa-mem285.042.29x1.00x0.36x—
minibwa30.366.42x2.80x1.00x—
v0.2.156.633.44x1.50x0.54x1.502x
v0.2.253.063.67x1.60x0.57x1.067x
v0.3.051.303.80x1.66x0.59x1.034x
v0.4.051.493.79x1.65x0.59x0.996x
v0.5.051.44 / 22.843.79x / 8.53x1.65x / 3.72x0.59x / 1.33x1.001x
v0.6.050.03 / 22.343.90x / 8.73x1.70x / 3.81x0.61x / 1.36x1.028x / 1.023x
v0.7.048.34 / 22.314.03x / 8.74x1.76x / 3.81x0.63x / 1.36x1.035x / 1.001x
v0.8.043.37 / 18.694.49x / 10.43x1.96x / 4.55x0.70x / 1.62x1.115x / 1.194x
v0.9.043.29 / 18.174.50x / 10.73x1.96x / 4.68x0.70x / 1.67x1.002x / 1.028x
v0.10.042.82 / 18.164.55x / 10.73x1.99x / 4.68x0.71x / 1.67x1.011x / 1.001x
v0.11.041.77 / 17.644.67x / 11.05x2.04x / 4.82x0.73x / 1.72x1.025x / 1.030x
v0.12.032.59 / 14.645.98x / 13.31x2.61x / 5.81x0.93x / 2.07x1.282x / 1.205x
v0.13.0*29.83 / 13.656.54x / 14.28x2.85x / 6.23x1.02x / 2.22x1.093x / 1.073x
v0.14.0*24.15 / 13.078.07x / 14.91x3.52x / 6.51x1.26x / 2.32x1.235x / 1.045x

vs prev is the release-over-release speedup (prev_wall / this_wall, >1 = faster) vs the previous release on this same host, stock / --fast. The first release's predecessor is upstream bwa-mem2 — bwa-mem3 is its successor — so v0.2.1's vs prev is its speedup over bwa-mem2 (blank on ARM, where upstream has no build).

Version pins: bwa 0.7.19 · bwa-mem2 v2.2.1 · minibwa commit d6d9f87d (minibwa-0.7). "ARM" = Graviton4 m8g (arm64/NEON, no SMT); "x86" = AMD m8a (x86-64/AVX-512, no SMT). Both are the general-purpose siblings of the c8g/c8a hosts used through v0.12.0 — same CPU family, same core count, no SMT, but 4 GiB/vCPU instead of 2 so every historical arm fits in memory — so absolute times are not comparable with earlier versions of this table, only ratios within it. (The x86 arm replaced an earlier Intel c7i arm, which ran 16 vCPUs over 8 physical cores under 2-way SMT and so wasn't a real core-for-core match for Graviton's 16 real cores.) No ARM bwa-mem2 build exists, hence the blank cells there. Every arm for a given arch ran interleaved on one fixed on-demand host — 3 reps each, median wall-clock shown — so these are same-host comparisons, not medians pooled across separate runs. — means the release predates the comparator or predates --fast. * v0.13.0 and v0.14.0 rows use the stride-2 suffix-array index described above; all other rows use the stock stride-8 index. Regenerated at each release; see Benchmarks.

[!WARNING] --fast is not alignment-identical to the default preset — it trades some sensitivity/specificity at the extremes (repetitive/multi-mapping regions, low-MAPQ reads) for the speedup above. See "Three ways to run it" below before switching a production pipeline to it.

Three ways to run it — plain, --compat, --fast

bwa-mem3 has three alignment modes that differ in what alignments come out, not just in speed:

modewhere reads alignwhen to use
plain (default)bwa-mem2's alignments plus bonafide correctness fixes, with two extra tags (MQ:i, HN:i) and an enriched header. On the cells re-measured for release 0.7.1, the complete alignment-record stream (tags stripped) is byte-identical to bwa-mem2 v2.2.1 on wgs-5M/wes-5M/hic-1M (x86 c6a AVX2, with a c6a/c8g cross-arch check confirming the Arm c8g NEON build matches) — differing only by those additive tags and the header. Separately, a 1.07M-record HG00096 WGS slice shows zero diverging primary alignments (x86, primary-only; not part of the cross-arch or complete-stream checks).Migrating a pipeline, validating against bwa/bwa-mem2, or any new pipeline.
--compat=bwa-mem2 / --compat=bwa-memByte-for-byte identical alignment records to a specific upstream (bwa-mem2 v2.2.1 or bwa 0.7.19), @PG excluded and -t/-K matched. The two targets are not interchangeable.Diff-clean validation against an existing bwa/bwa-mem2 golden.
--fastFaster, and not record-compatible with the default: it reshuffles the low-confidence tail (~85% of the reads it re-places had MAPQ 0; the confident MAPQ-60 core moves on ≤0.5%, 0.011% on wgs-5M) while staying accuracy-neutral against golden truth (≤0.02 pp across the WGS and methylation sims). Figures from the benchmark release-validation cells (wgs-5M/wes-5M/panel-twist-5M at 5 M reads, hic-1M/sbx-1M at 1 M) across every SIMD tier (AVX2 c6a, AVX-512 c7a/c7i, NEON c7g/c8g; meth on m7i), each a .4xlarge host at -t 16, -K 160000000.High-throughput pipelines where you care about the confident, uniquely-mapped calls.

--compat is mutually exclusive with --fast (and with --meth and --proper-pair-from-emitted). See Alignment modes for the full side-by-side and Equivalence with bwa-mem2 for the field-by-field audit.

By default bwa-mem3 keeps bwa-mem2's command-line defaults, so it drops into an existing pipeline unchanged. For the fastest configuration — and what each recommended deviation from the bwa defaults trades for speed — see Settings profiles: bwa drop-in vs recommended.

Full documentation: https://bwa-mem3.readthedocs.io

Install

The recommended way to install bwa-mem3 is via bioconda:

mamba install -c bioconda bwa-mem3
bwa-mem3 version

Prebuilt packages are available for linux-64, linux-aarch64, and osx-arm64.

Build from source

git clone --recursive https://github.com/fg-labs/bwa-mem3.git
cd bwa-mem3
make
./bwa-mem3 version

See the installation guide for prerequisites and architecture-specific notes.

  • Benchmarks — published results for every release, and how they are measured
  • bwa-mem3-rs — Rust bindings for bwa-mem3
  • bioconda recipe — conda package on bioconda
  • fgumi — UMI-aware consensus and deduplication
  • bwa-mem2 — upstream project

License

MIT. See the License page in the docs.

Citation

Please cite the bwa-mem2 paper (Vasimuddin Md et al., IPDPS 2019). See the Citation page for BibTeX.

Issues / contributing

File issues and pull requests on fg-labs/bwa-mem3.

alignment
bioinformatics
bwa
bwa-mem2
genomics
methylation
short-read