bmc Bitcoin Machine Code Benchmarks
GitHub

Benchmarks & Verification Gate

Head-to-head measurements against Bitcoin Core v31.1 on identical hardware (Ryzen 9 9950X3D, 16 cores, 123 GiB RAM, NVMe, dbcache=8192, txindex + coinstatsindex + blockfilterindex) plus the full 483-command static & dynamic QA gate.

Highlighted green (✓) = Superior metric in row (lower time, CPU, latency, memory, or disk) Highlighted blue = Exact parity / tie

1. Mainnet Initial Block Download (Genesis to All Indexes at Tip)

Both nodes synced from genesis over the live Bitcoin mainnet with Core's default assumevalid=938343, 10 download peers, and a 1,024-block window. Finish line is when every enabled index reaches the tip, verified MuHash3072-identical to Core v31.1.

Mainnet IBD Wall-Clock Time (Lower is Better)
bmc Run 46 (default)
3h 17m 55s (3.0× faster)
3:17:55
bmc assumevalid=0
8h 00m (every script verified)
8:00:00
Core v31.1 Rerun #7
9h 50m 04s
9:50:04
Core v31.1 Rerun #6
10h 42m 05s
10:42:05
Milestone (Lower is Better) Core v31.1 #7 bmc Run 41 bmc Run 46 (Release) Winner & Margin
Headers → Block 10:450:480:34bmc 46 1.32× faster
Height 100,0002:061:351:22bmc 46 1.54× faster
Height 300,00015:306:576:35bmc 46 2.35× faster
Height 500,0001:43:3044:2540:49bmc 46 2.54× faster
Height 800,0005:54:002:15:532:03:21bmc 46 2.87× faster
Height 900,0008:13:373:10:022:44:26bmc 46 3.00× faster
All indexes at tip9:50:043:48:223:17:55bmc 46 3.0× faster
Total CPU consumed13h 15m7h 39m7h 13mbmc 46 1.84× less CPU
Heap peak12.0 GB—13.3 GBCore #7 1.11× lower peak
Heap mean10.0 GB—8.2 GBbmc 46 1.22× lower mean

2. Per-Core secp256k1 Verification Benchmarks

Hand-written x86-64 secp256k1 assembly (safegcd modular inversion, addition-chain square roots, GLV wNAF scalar multiplication) measured on one pinned core against Core's own libsecp256k1:

Primitive (Lower is Better) bmc (x86-64 asm) libsecp256k1 (Core) Winner & Margin Verification Oracle
ECDSA verify (1 core)20.2 µs21.0 µsbmc 1.04× fasterCore vectors + randomized differential
BIP340 Schnorr verify (1 core)22.3 µs22.0 µsCore 1.01× fasterBIP340 vectors + frozen ref + differential
Scalar inverse (sc_inv_var)0.67 µs0.68 µsbmc 1.01× fasterBernstein–Yang safegcd
Field multiply (latency)8.7 ns9.3 nsbmc 1.07× fastertests/bench_fe
Mixed point add96 ns105 nsbmc 1.09× fastertests/bench_point

3. Post-Sync RPC Serving & Concurrency

Best-of-5 loopback RPC latency at matched mainnet height (fixed-workload rows independent of mempool size, plus 32-client concurrency benchmarks from docs/PERFORMANCE.md):

RPC Call (Lower is Better) bmc Core v31.1 Winner & Margin
getblock 900000 13 ms5 msbmc 1.7× faster
getblock 900000 231 ms53 msbmc 1.7× faster
gettxoutsetinfo muhash4 ms4 msTie Exact parity
getchaintips2 ms97 msbmc 48× faster
32 concurrent getpeerinfo8 ms10 msbmc 1.25× faster (FAST lane)
32 concurrent getblockchaininfo7 ms8 msbmc 1.14× faster (FAST lane)
32 concurrent getmempoolinfo (pre-memoize)55 ms22 msCore 2.5× faster (O(1) counters)

4. Disk & Memory Footprint Tradeoffs

Speed vs. resource efficiency: bmc achieves a much smaller txindex and faster IBD, while Bitcoin Core maintains a significantly leaner overall disk and peak-PSS memory footprint.

Resource Component (Lower is Better) bmc Core v31.1 Winner & Reason
Blocks archive (blk*.dat)716.6 GB716.6 GBTie Identical block payload (monotonic in bmc)
txindex26.9 GB68.8 GBbmc 2.6× smaller (sorted runs vs LevelDB)
blockfilterindex12.2 GB12.3 GBbmc Near parity (-0.1 GB)
Undo data (rev*.dat)246.6 GB100.0 GBCore 2.5× smaller (bmc keeps full scripts for addrindex)
coinstatsindex1.8 GB0.2 GBCore 9.0× smaller
UTXO set on disk12.8 GB10.6 GBCore 1.2× smaller (LevelDB vs LSM runs)
Total datadir (all enabled indexes)1,312.4 GB917.7 GBCore 30% smaller (bmc includes 295 GB addrindex+txospender)
Post-sync steady-state RSS7.0 GB6.7 GBCore 4% lower (2 procs vs 3 procs)
IBD peak PSS (mmap default)56.3 GB~9–10 GBCore ~5.6× lower (pread+dropappends cuts bmc to 22.1 GB)

5. Static Audits & 483-Command QA Gate

Every merge to main must pass the full static & dynamic gate on both Linux x86-64 (make -C asm test) and macOS Apple Silicon (port/osx/run_tests.sh), audited by make gate-log-check:

CheckTool / TargetWhat It Guarantees
abi-checkscripts/abi_stack_audit.py --external-only --checkEvery C-to-asm call honours SysV 16-byte stack alignment (0 external violations across 482 x86-64 functions).
callee-saved-checkscripts/abi_callee_saved_audit.py --checkZero callee-saved register leaks (rbx/rbp/r12-r15) across all 482 x86-64 functions.
arm64-abi-checkscripts/arm64_abi_audit.py --checkAudits all 50 port/osx/*.S files (323 global fns, 1,293 SP-align ops, 25 Darwin svc #0x80 carry-flag checks; 0 violations).
consensus-inc-checkscripts/gen_consensus_inc.py --checkSingle-source codegen keeping 25 consensus constants synchronized across asm/consensus_limits.inc and port/osx/consensus_limits.inc.
fuzz-gatemake -C fuzz replay && make -C fuzz smokeDouble-sided PROT_NONE guard-page assembly fuzzers (tx 6.08M/s, cons 5.08M/s, script 1.72M/s), ASan/UBSan C fuzzers, plus 2.13M exec/s in-process Core v31.1 differential script fuzzer (Continuous Fuzzing).
github-ci.github/workflows/ci.yml & release.ymlAutomated Linux x86-64, macOS Apple Silicon, and Windows x86-64 static audits, sanitizers, fuzz smoke, and tagged release builds.
prereq-checkscripts/makefile_prereq_audit.py --checkEvery Makefile recipe (629 rules) declares every object/binary it consumes (GNU Make ≥ 4.0 enforced).
runlist-checkscripts/makefile_runlist_audit.pyAll 487 test sources are either gated (474) or explicitly declared manual (13).
link-checkmake -C asm link-checkEvery rule links every object defining symbols referenced by its sources.
san-checkmake -C asm san-checkAddressSanitizer + UndefinedBehaviorSanitizer passes on core parsers, mempool, script, and wallet modules.
script-flags-checkvalidation/gen_script_flags.pyScript activation heights & exception hashes match Bitcoin Core v31.1 source verbatim.
log-literal-checkscripts/log_literal_len_check.pyEvery counted write/log literal matches its exact byte length.
gate-log-checkmake -C asm gate-log-check LOG=...Verifies make exited 0, all 483 gated tests executed, and zero failure markers appeared.