Squint 3.2.2 b2
Added Merge so writes and enumerations aren't blocked from each other
This will later facilitate Acid gets and writes during enumerations, where
gets are immediate
writes are immediate
enumerations are immediate in respect to existing keys being updated during an enumeration
Squint 3.2
Added Binary key functions and an optional Hash in numeric for large keys
added basic example of binary keys and hash (hat)
Squint 3.1.4
PB 6.03 x86/x64 asm and c backend, Arm 32/64 Pi3 and PI4
Added thread safe fences for lock free reads and writes, This has slowed it down by half but there was still a chance it would step on itself and crash, the memory fences have hopefully alleviated it.
It now works on Raspberry PI4 and Pi3
added comments
squint is a versatile structure it can be used to replace both maps and lists. you can even mix numeric keys with string keys in the same squint trie and keys can be Unicode, UtF8, Ascii, integers or binary
Its an ideal structure for implementing a key / pair store, it provides indexing and prefiix queries, with its output in Lexographic sorted order. Tries are widely used in DB engines, IP tables, grep, regex and in languages like python to set and return multiple items from a function.
Squint3 is now reentrant enabling sub tries or collections, so not only can it be used as a replacement for maps and lists it can used like an in mem DB which allows you to to shortcut writes but only in a single writer thread.
Thread tests are lock free readers and a starved writer thread.
Random key look up rates over a set with 4,194,304 (keys may not exist in set)
codeSquint Numeric lookup items 94,865,337 p/s avg per thread 8,624,121
lookup rate 723.77 mb p/s
lookup time 10.54 ns
Squint Numeric writes items 1,629,607
Write rate 12.43 mb p/s
num items 4,194,304 mem 148.38mb keysize 16.00 mb
vs map
Map lookup items 3,419,641 p/s avg per thread 310,876
lookup rate 26.09 mb p/s
lookup time 292.43 ns
map writes items 577,383 p/s
Write rate 4.41 mb p/s
num items 4,194,304 mem 117.88mb keysize 53.88 mb
string keys
Squint lookup items 15,122,076 p/s avg per thread 1,374,734
lookup rate 158.64 mb p/s
lookup time 66.13 ns
Squint writes items 655,299
Writes rate 6.87 mb p/s
num items 4,194,304 mem 96.98mb keysize 45.87 mb
vs map
Map lookup items 3,137,418 p/s avg per thread 285,219
lookup rate 32.91 mb p/s
lookup time 318.73 ns
map writes items 546,662 p/s
Write rate 5.73 mb p/s
num items 4,194,304 mem 109.87mb keysize 45.87 mb
https://github.com/idle-PB/Squint3/blob ... quint3.pbi