word: store data entries as prepared subarrays
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 26 Dec 2021 20:06:12 +0000 (21:06 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Fri, 31 Dec 2021 04:29:05 +0000 (05:29 +0100)
commit139cfe4ebde273208f91d401a2938330faf41c06
treef5af9480f7f8d322c1e5b7fe196fb1a1609ed915
parentbd0f5795b49558a6e322680474fca0c9c49f7855
word: store data entries as prepared subarrays

Time to split strings is comparable to directly loading structured values.
Considered hashes for scalability with more (optional) columns, but not
worth the cost at this time.

Benchmark loading 1264 rows in perl:
       rate memory size
strings 468/s  52kB 15kB
split  257/s 152kB  "
arrays 221/s 133kB 17kB
hashes 126/s 188kB 27kB
tools/mkwordlist
word.plp
word/quiz.js