Batch Processing Benchmarks
Batch benchmarks time a complete directory run: parsing, SASA calculation, output writing and worker scheduling. The runs use zsasa 0.12.1, pinned comparator builds and 128 sphere points, and the comparators were measured in the same session. Rows measured with another zsasa release name it.
FreeSASA has no native directory mode, so its rows use a thin freesasa_batch wrapper around the pinned FreeSASA C API.
Throughput and memory#
Throughput against peak memory
Data table
On both proteomes the zsasa bitmask modes sit in the top-left corner: the highest throughput at the lowest peak memory. The exact f64 and f32 modes are faster than FreeSASA batch and RustSASA. The comparators use 3.1 to 4.2 times the peak memory of zsasa on E. coli and 3.4 to 7.2 times on Human.
Batch throughput and memory at 10 threads
Data table
E. coli AFDB#
| Tool | Runtime (s) | Structures/s | Peak RSS (MiB) | vs FreeSASA batch | vs RustSASA | vs Lahuta bitmask |
|---|---|---|---|---|---|---|
| zsasa f64 | 4.457 | 981 | 54.2 | 3.11× | 1.38× | 0.46× |
| zsasa f32 | 4.380 | 998 | 52.1 | 3.16× | 1.40× | 0.47× |
| zsasa bitmask f64 | 1.569 | 2,784 | 56.2 | 8.82× | 3.92× | 1.32× |
| zsasa bitmask f32 | 1.526 | 2,864 | 54.8 | 9.07× | 4.03× | 1.36× |
| FreeSASA batch | 13.846 | 316 | 228.8 | 1.00× | 0.44× | 0.15× |
| RustSASA | 6.145 | 711 | 170.2 | 2.25× | 1.00× | 0.34× |
| Lahuta | 7.039 | 621 | 187.5 | 1.97× | 0.87× | 0.29× |
| Lahuta bitmask | 2.071 | 2,110 | 176.8 | 6.68× | 2.97× | 1.00× |
E. coli AFDB: 4,370 structures, 10 threads, 128 sphere points.
Human AFDB#
| Tool | Runtime (s) | Structures/s | Peak RSS (MiB) | vs FreeSASA batch | vs RustSASA | vs Lahuta bitmask |
|---|---|---|---|---|---|---|
| zsasa f64 | 44.204 | 534 | 96.2 | 3.33× | 1.27× | 0.45× |
| zsasa f32 | 43.439 | 543 | 91.3 | 3.39× | 1.29× | 0.46× |
| zsasa bitmask f64 | 14.729 | 1,601 | 98.5 | 10.00× | 3.82× | 1.34× |
| zsasa bitmask f32 | 14.349 | 1,644 | 93.6 | 10.26× | 3.92× | 1.38× |
| FreeSASA batch | 147.248 | 160 | 676.4 | 1.00× | 0.38× | 0.13× |
| RustSASA | 56.208 | 420 | 328.5 | 2.62× | 1.00× | 0.35× |
| Lahuta | 71.551 | 330 | 340.5 | 2.06× | 0.79× | 0.28× |
| Lahuta bitmask | 19.805 | 1,191 | 352.5 | 7.43× | 2.84× | 1.00× |
Human AFDB: 23,586 structures, 10 threads, 128 sphere points.
The "vs" columns are runtime ratios: the comparator's runtime divided by the row's runtime.
Thread scaling#
E. coli AFDB throughput by thread count
Data table
From 1 to 10 threads, zsasa f64 gains a factor of 6.6 and bitmask f32 a factor of 6.7 on a machine with 4 performance and 6 efficiency cores. Parallel efficiency is 0.95 at 4 threads and falls once the threads exceed the performance cores. FreeSASA batch does not scale beyond 4 threads.
Beyond the core count#
zsasa accepts more worker threads than the machine has cores. The benchmark machine has 10 logical CPUs, so 20 and 40 workers are overcommitted.
zsasa beyond the core count
Data table
On the E. coli and Human runs, extra workers change throughput by less than 3% and raise peak memory with the worker count. On SwissProt, 20 workers raise bitmask throughput by 4% and 40 workers lower it by 2%.
The "Busy cores" metric shows why. The E. coli and Human collections occupy 0.8 and 9.1 GB on disk and fit in the file cache of the 32 GB machine, and zsasa keeps 8.6 to 9.6 of the 10 cores busy on them. SwissProt occupies 119 GB, and with 10 workers the bitmask run keeps only 4.8 cores busy on average. The idle workers wait inside open(): the benchmark machine runs endpoint-security software that scans every file when it is first opened (see SwissProt AFDB). Using more workers than cores is therefore an option for runs that wait on file access, not a general setting.
Human AFDB, mmCIF input#
The mmCIF runs compare two parser paths, the generic mmCIF parser and a fast path for AlphaFold models ("AF fast"), with two input strategies, reading the whole file or memory-mapping it. All four are bitmask f32 runs of zsasa 0.12.1, and Lahuta was measured in the same session.
| Tool | Runtime (s) | Structures/s | Peak RSS (MiB) | vs Lahuta bitmask |
|---|---|---|---|---|
| zsasa generic/read | 16.806 | 1,403 | 142.5 | 0.93× |
| zsasa generic/mmap | 16.623 | 1,419 | 127.5 | 0.94× |
| zsasa AF fast/read | 15.100 | 1,562 | 94.8 | 1.04× |
| zsasa AF fast/mmap | 14.998 | 1,573 | 83.8 | 1.04× |
| Lahuta bitmask | 15.653 | 1,507 | 354.0 | 1.00× |
Human AFDB, mmCIF: 23,586 structures, 10 threads, 128 sphere points.
The AF fast path is about 4% ahead of Lahuta bitmask at about a quarter of its peak memory, and the generic parser is 6 to 7% behind. Reading and memory-mapping the input take the same time within 2% on this warm-cache run; memory-mapping has the lower peak memory, 84 against 95 MiB for the AF fast path at 10 threads and 240 against 319 MiB at 40 workers.
SwissProt AFDB#
SwissProt is the largest dataset, 550,122 structures. Each configuration was measured once, so this section reports single observations without an uncertainty estimate.
The benchmark machine scans every file when it is first opened, and this collection is too large for its files to stay cached and scanned between runs. macOS also slows that scan down while a tool reads from the same disk with the default I/O policy. The SwissProt commands were therefore run under the passive disk I/O policy (taskpolicy -d passive), for zsasa and Lahuta alike.
| Tool | Runtime (s) | Structures/s | Peak RSS (MiB) | vs Lahuta bitmask |
|---|---|---|---|---|
| zsasa 0.12.1 f32 | 748.801 | 735 | 289.2 | 0.58× |
| zsasa 0.12.1 bitmask f32 | 344.049 | 1,599 | 291.3 | 1.26× |
| Lahuta bitmask | 433.474 | 1,269 | 659.5 | 1.00× |
SwissProt AFDB: 550,122 structures, 10 threads, 128 sphere points.
At 10 threads zsasa 0.12.1 bitmask f32 processes the collection in 5.7 minutes at 1,599 structures/s, against 1,269 structures/s for Lahuta bitmask, at 44% of its peak memory. Exact f32 runs at 735 structures/s. Lahuta's bitmask SASA mode reads only AlphaFold models and was measured at 10 threads; it has no equivalent of worker overcommit. With 20 and 40 workers zsasa 0.12.1 bitmask f32 reaches 1,666 and 1,566 structures/s at 373 and 531 MiB.
Since 0.11.0, --passive-io requests the passive policy from within zsasa.
The same commands under the default I/O policy were measured with zsasa 0.12.1 in a separate session. Under that policy both tools were slower on this machine: at 10 threads zsasa bitmask f32 ran at 1,029 structures/s and Lahuta bitmask at 916. With zsasa 0.9.0, in July 2026, the order at 10 threads was reversed (821 against 935 structures/s). The investigation notes in the benchmark repository have the measurements behind this.
Reproducing these results#
The charts and tables on this page are generated from results/tables/batch_t10_summary.csv and batch_thread_scaling.csv in N283T/zsasa-benchmarks, which also holds the full harness and manifests.