benchmarks.site

Security (macOS malware scanning)

Scanner performance: database loading, re-scans, TLSH in SQL, Aho-Corasick

Speed measurements of a malware scanner: loading its databases, re-scanning, and two search libraries.

Key finding

Database load time dropped from 60–77 s to ~11 s, a re-scan of Numbers.app (33819 files) from 131.7 s to 24.7 s, and moving TLSH candidate selection into SQL gave identical results (718/718) ~1.6× faster; `ahocorasick_rs` built lazily beats loading a pickled `pyahocorasick` automaton, and threaded sharding gives no speedup because of the GIL.

How to read the numbers

Time — lower is better.

Hover a column name for its meaning, or see the glossary.

How we tested & caveats · Markdown · CSV

These are manual measurements taken on the development Mac in November 2026. There are no raw result files for them; the numbers below are the recorded results.

Ours (own engine)

3 rows · 5 columnsCSV
Database load time2026-11-0960–77 s~11 sabout 5.5–7× faster
Scan memory: re-scan of Numbers.app (33819 files)2026-11-11131.7 s24.7 sabout 5.3× faster
TLSH candidate restriction in SQL (tlsh_candidates_within)2026-11-09——718/718 identical results, ~1.6× faster
  • Database load time: time to load the signature and hash databases at engine start.
  • Scan memory: the scanner remembers files it has already scanned, so a second scan of the same application bundle (Numbers.app, 33819 files) only has to handle what changed.
  • TLSH in SQL: the set of TLSH fuzzy-hash candidates within a distance limit is restricted already in the SQL query (tlsh_candidates_within); all 718 compared results were identical to the previous method.

External libraries

3 rows · 4 columnsCSV
pyahocorasick (save/load of a prebuilt automaton, pickle)2026-11-09load time76 s
ahocorasick_rs (build the automaton)2026-11-09build time~25 s
Building the automaton in threads (sharding)2026-11-09build timeno speedup (GIL)
  • Loading a pickled pyahocorasick automaton (76 s) was slower than building one from scratch with ahocorasick_rs (~25 s), so ahocorasick_rs stays, and the automaton is built lazily (only when it is first needed).
  • Splitting the pattern set into shards and building them in parallel threads gave no speedup, because of Python's global interpreter lock (GIL).