swindl 3.2.1 · source on github

Benchmarks

swindl against what you would otherwise use, on the same data, with the same questions, all of them durable:

The data is a record collection: title, artist, label, genre, country, format, year and notes, generated with a fixed seed. Words follow a Zipf distribution, as in real titles: a few words are in many records, most in few.

Fair to every side.

What it shows.

On macOS, a plain fsync does not flush the drive’s own cache; a full sync (F_FULLFSYNC) does, and costs tens of milliseconds. tantivy always does a full sync, so on macOS the benchmark makes SQLite (fullfsync) and PostgreSQL (wal_sync_method = fsync_writethrough, set for the run and set back after) do the same, for writes that are equally durable. sjdbl’s files use a plain fsync, as the databases do by default; that is swindl’s “index on the timer” row. On Linux, fsync flushes the drive’s cache and all of this doesn’t apply.

Run it yourself (the numbers depend most on your disk). PostgreSQL and Meilisearch are included when you give their address:

PYTHONPATH=. python benchmarks/bench.py \
    --postgres "host=/tmp dbname=postgres" \
    --meilisearch http://127.0.0.1:7700 --meilisearch-key <master key>

Results

Measured 2026-11-16 on arm, 10 CPUs, macOS-26.6.2-arm64-arm-64bit-Mach-O; Python 3.15.2, tantivy 0.27.0, SQLite 3.54.1, PostgreSQL 17.12, Meilisearch 1.57.0. Full syncs (macOS): SQLite with fullfsync, PostgreSQL with wal_sync_method=fsync_writethrough, as tantivy does; sjdbl’s files with a plain fsync. Median of repeated runs, in milliseconds; the fastest in bold.

10,000 records

QuestionhitsswindlSQLite + FTS5PostgreSQLMeilisearch
text: a common word5,5090.732.773.310.70
text: a rare word50.120.070.190.43
text: two words1,8370.691.041.100.76
prefix: 3 letters*3,5481.662.101.770.74
filter genre, sort year desc1,3940.440.050.230.58
range of years, sort artist1,3150.510.110.170.63
text + drilldown (2 facets)5,5090.796.436.040.83
page 50, sorted on year10,0000.800.862.5911
get one object by id10.030.010.070.14
WritingswindlSQLite + FTS5PostgreSQLMeilisearch
change one object, searchable at once (ms)823.914.0022
change one object, index on the timer (ms)0.81---
change one object, index committed by the next search (ms)0.46---
load, transactions of 1,000 (objects/s)4,26539,41518,63322,618
rebuild the search index (s)0.80.010.02-
on disk (MB)84623
what you runnothing: a librarynothing: a librarya database servera search server, and a store for the data

100,000 records

QuestionhitsswindlSQLite + FTS5PostgreSQLMeilisearch
text: a common word55,0711.3331160.72
text: a rare word460.440.110.240.64
text: two words17,9750.989.62100.72
prefix: 3 letters*35,4234.2721190.78
filter genre, sort year desc13,8670.550.200.570.62
range of years, sort artist13,0711.010.800.700.69
text + drilldown (2 facets)55,0711.7170351.08
page 50, sorted on year100,0001.591.885.0811
get one object by id10.100.010.080.15
WritingswindlSQLite + FTS5PostgreSQLMeilisearch
change one object, searchable at once (ms)933.963.9923
change one object, index on the timer (ms)0.89---
change one object, index committed by the next search (ms)0.69---
load, transactions of 1,000 (objects/s)3,62215,02923,59617,359
rebuild the search index (s)12.60.110.12-
on disk (MB)724457167
what you runnothing: a librarynothing: a librarya database servera search server, and a store for the data