aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAnthony Wang2024-10-28 13:56:52 -0400
committerAnthony Wang2024-10-28 13:56:52 -0400
commit85337a55a704d1ce37a7308b1b00d7e5e803b7ce (patch)
treee513bdb9414be7e26c83c7d59624b03d869125ee /README.md
parente0ea4329dc01c810ab10a967aea6ef551e27f693 (diff)
Clarify why WAL improves perf
Diffstat (limited to 'README.md')
-rw-r--r--README.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/README.md b/README.md
index 9144fb1..dc45c2a 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ This is a C port of [SD](https://git.exozy.me/a/SD), a very efficient (and a tin
Flash cards are stored in the `cards` table of a SQLite database. There are four columns: `idx INTEGER PRIMARY KEY, weight INTEGER, key TEXT, val TEXT`. The `idx` is a unique index for each card, starting at 0. The weight is how often the card should come up. The key and value are the front and reverse sides of the card.
-To create a card deck, use `sqlite3 cards "CREATE TABLE cards (idx INTEGER PRIMARY KEY, weight INTEGER, key TEXT, val TEXT)`. You may be able to double the performance by enabling WAL with `PRAGMA journal_mode=WAL`, because WAL only writes the content once instead of twice.
+To create a card deck, use `sqlite3 cards "CREATE TABLE cards (idx INTEGER PRIMARY KEY, weight INTEGER, key TEXT, val TEXT)`. You may be able to nearly double performance by enabling WAL with `PRAGMA journal_mode=WAL`, because WAL normally writes the content once instead of twice, except during checkpointing.
Now build SDC with `gcc sd.c segmenttree.c -o sd -lsqlite3 -O2 -march=native` and run `./sd` to enjoy a fast flash cards experience! You can also install the `sdc-git` package from the [AUR](https://aur.archlinux.org/packages/sdc-git). The program will display the `key` of a randomly selected card. Press any key to show the `val` of the card. Now press either `y` or `n` depending on whether you got the card correct, and the program adjusts that card's weight.