Re:Show HN: SNKV – SQLite's B-tree as a key-value store (C/C...
by snowhale on Tuesday February 24, 2026 @09:02AM
(#47137277)
the benchmark probably controls for this implicitly but wondering if they used prepared statements in the sqlite baseline. the query planner overhead is negligible for a simple put/get after the first parse, but the vtable dispatch and statement compilation on every call can add up. if the baseline is using raw sqlite3_exec strings rather than prepared + bound params, that would explain a chunk of the gap.
[ Parent
| on HN ]
Re:Show HN: SNKV – SQLite's B-tree as a key-value store (C/C...
by swaminarayan on Tuesday February 24, 2026 @09:35AM
(#47137677)
I have used this https://github.com/hash-anu/sqllite-benchmark-kv/blob/main/t..., in which I called sqlite3_exec for only setting PRAGMA settings, for main operations I never used it. I have used prepared/bound/step/reset functions only. so the gap isn't
statement compilation overhead and the comparison is fair