Skip to content

Performance Benchmarks โ€‹

FLASH is tuned for honest encrypted throughput โ€” batch writes, balanced durability, and deferred Merkle rebuilds on bulk paths.


Benchmark Results (v1.2.5) โ€‹

Measured with npm run benchmark on Apple Silicon (Node 20+):

===============================================================
โšก FLASH High-Performance Engine Benchmark โšก
===============================================================

๐Ÿ”ง Engine profile: durability=balanced, memtable=4MB, worker flush=on

๐Ÿ“Š 1. Binary Document Serialization (10,000 Operations)
   - Traditional JSON parse + field lookup:   ~230,000 ops/sec
   - FlashBinary Zero-Copy O(1) field lookup: ~400,000 ops/sec
   ๐Ÿš€ FlashBinary Speedup: ~1.7x vs JSON

๐Ÿ” 2. Cryptographic Throughput (5,000 Operations)
   - AES-256-GCM + HMAC Blind Indexing: ~26,000 ops/sec

๐Ÿ’พ 3. End-to-End Database Engine Throughput (2,000 Documents)
   - insertOne (balanced WAL batching):     ~330 ops/sec
   - insertMany turbo batch (2,000 docs):   ~2,650 ops/sec
   - Encrypted Blind Index Point Reads:     ~6,000 ops/sec

๐Ÿ”’ Tamper-Proof Merkle State Root: (computed via refreshMerkleRoot)
===============================================================

INFO

1M+ ops/sec refers to FlashBinary zero-copy field lookups โ€” not encrypted end-to-end writes. Always check the benchmark section that matches your workload.


Workload Guide โ€‹

WorkloadRecommended APIDurability
Single encrypted insertsinsertOnebalanced (default)
Bulk import / seed datainsertManybalanced or throughput
Audit / financial loginsertOnestrict
Benchmark / disposable datainsertManythroughput + close()

See Engine Options for configuration.


Running Locally โ€‹

bash
npm run benchmark

Results vary by CPU, disk (SSD vs HDD), and Node version.


What Changed in v1.2.5 โ€‹

SettingBeforeAfter
Memtable threshold64 KB4 MB
Default durabilityfsync every writebalanced (batch 64 ops / 25 ms)
Bulk oplogper-doc appendappendBatch
L0 compaction trigger4 SSTables8 SSTables

Zero-knowledge encrypted intelligence ยท Apache 2.0