Skip to content

More benchmarks #23

rhashimoto started this conversation in Show and tell
More benchmarks #23
May 25, 2021 · 0 comments

I implemented the benchmarks from this SQLite page. The page is old (SQLite 2.7.6 is from 2003) but the benchmark operations themselves are still interesting. The benchmarks can be accessed at demo/benchmarks.html, and are online here.

The benchmark page runs the same 16 tests with several VFS types and options:

  • default - SQLite's default VFS which uses the Emscripten in-memory filesystem.
  • Memory - Synchronous MemoryVFS on the standard (synchronous) build.
  • Memory (async) - Synchronous MemoryVFS on the Asyncify build.
  • MemoryAsync - MemoryAsyncVFS on the Asyncify build. This just wraps every MemoryVFS method with an asynchronous handler.
  • IDBMinimal - IDBMinimalVFS on the Asyncify build.
  • IDBMinimal relaxed - IDBMinimalVFS with relaxed durability on the Asyncify build.
  • IDBBatchAtomic - IDBBatchAtomicVFS on the Asyncify build.
  • IDBBatchAtomic relaxed - IDBBatchAtomicVFS with relaxed durability on the Asyncify build.

I changed one benchmark from the SQLite page. The original Test 7 is not wrapped in a transaction and I added one. I did this because Test 7 should be compared with Test 4 - SELECT with/without an index - and Test 4 uses a single transaction.

To run the benchmarks, first change the preamble SQL to set up any options, e.g. type of journaling, locking, etc., then click the Start button. You may need to be patient (especially with Test 1 on the IndexedDB classes which uses a transaction per INSERT); completing the table can take a couple minutes or more.

Replies

0 comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant