Cash ledger vs statement
A cash ledger against its bank statement
- 6columns a side
- 1key
- 1compared
- 3carried
At a million rows a side: 1,000,000 ledger rows against 986,014 statement rows, and 280,719 breaks found.
Performance
Powered by Rust
Every figure below was measured on real hardware, from synthetic data with known answers.
Measured on an Apple silicon Mac, release build, from staged inputs, median of three runs. Each size uses the smallest thread count and memory limit within 10% of the fastest.
What was reconciled
Synthetic data with known answers: every break found matches the answer key. The same two reconciliations at every size.
Cash ledger vs statement
At a million rows a side: 1,000,000 ledger rows against 986,014 statement rows, and 280,719 breaks found.
TPC-H orders, two snapshots
At a million rows a side: 1,001,880 orders on each side, and 50,600 breaks found.
Why it is fast
Every comparison takes a whole batch of values in one call, on every thread at once.
10 calls to compare 10 values
1 call compares up to 2,048 values
Measured on Apple silicon (ARM64, 128-bit NEON vector registers).
Scale
A thousand times the rows, on the same machine. Ten million rows a side reconcile in under two minutes on the cash ledger.
Both axes on a log scale. Each size ran on its own setting: one thread up to a hundred thousand rows, eight at a million, twelve at ten million.
Where the time goes
Most of a run is preparing the two sides: reading types, normalising values and recording what was done. Matching is about a tenth of a million-row run.
Each bar is one run, scaled to 100%. "Other" is starting the process and opening the workspace.
Runs on little
More threads only help once there is enough work. Below a hundred thousand rows, one thread is as fast as twelve; at a million, threads help up to eight.
At a million rows a side on twelve threads, 512 MB is within about 6% of 4 GB. The time a run takes, not the memory it uses, is what this chart shows.