dictionary for J. inverted table implemetation auto upgrades from native to boxed data including nested dictionaries.
Definition of dictionary:
A datastructure such that when provided with a list of keys a get function will retrieve
the latest value associated with that key as a result of latest set/add/del operations that could have modified that associated value.
If a requested retrival key has no associated value, then nothing is returned,
where in a list of requested keys, nothing combined with other requested values is the list of the other values.
If a user only uses set/del modifiers after loading or optimizing to a unique dictionary, then the dictionary will remain in unique state.
a user may use special add1 function to place kv in non-unique state. get and filter will still operate as if unique.
in non unique mode, filtall and delall will affect multiple values. set/del/get operate on last key occurrence + related value.
keys are stored as a table of symbols. Values as a table of numeric, string, or boxed values. Table width for simplest keys and values is 1.
This allows multikey keys or metainfo after first key. Allows inverted table or associated array datastructures.
Boxed values permit embedded keyed dictionaries.
keyed data/value access is similar to J locale access to data/functions.
An embedded dictionary is an association of data variables that replaces use for a locale/datastructure.
A dictionary or dictionary hierarchy is a single J entity that can be serialized/deserialized with 3!:1 , 3!:2
Basic operations:
(key0;key1...) kv val1;val2... creates dictionary. keys can also be a space separated string, or symbols. # of keys and values must match
a dictionary is 2 boxes. left is keys as symbols, right is values. Both are table shaped.
(key0;key1...) kvget dictionary... retrieves any values associated with key0 and/or key1 and/or other keys in list. Unboxes values if possible.
kvdel has same calling signature. will delete any keys+associated values matching x argument.
kvfilt will return a dictionary instead of just values.
kvfiltall will return duplicate keys instead of just last one. kvdelall deletes all duplicate keys instead of last.
dictionary kvset dictionary... uses x dictionary key/values to update/add y dictionary. Merging matching keys with new values from x.
kvadd has same signature.
deep set of dictionaries supported with embedded dictionary in x argument. d suffix to functions operate in deep mode.
DSL versions of above versions allow a single x string to represent dictionary x arguments. including deep operations.
Features:
intended for coinsert 'kv' into any other locale. (should be) safe for coinsert_z_ 'kv' (base needs extra coinsert 'z' call)
unique key implied access even when non-unique keys permitted.
create(bulk), add, del, update/set all have versions to allow/avoid duplicates. 1 suffix permits duplicates
optimized for bulk operations, where arguments to functions are either a list of keys, or a kv dictionary.
kv dictionary always y argument to kvfunctions. modifications return copies.'
x right argument to set/add is another dictionary (key,value pairs)
x right argument to get/del is a boxed list of symbol keys or keys as strings.
A DSL is provided to permit one line string descriptions of required x argument dictionaries or deep set/get/del variations.
Non-unique key implementation can still provide unique key expected behaviour. add appending a duplicate key-value creates an undo operation when del deletes the last value.
use kvadd1 instead of kvadd
Multiple internal keys also permit using kv with meaningful order (kvinsert permits ordered manipulation) and /.(key) "applications" and classifiers.
tosym replacement for s: cut instead of leading delimiter. tosym on symbols returns the symbols instead of error. Use of ;: in dsl version allows J words as keys/symbols.
values kept native numeric or string (padded) if possible. Otherwise boxed.
values can hold other kv structures, and so may wish to hold 3 independent dictionaries for each data type: numeric, string, boxed.
kv (get) function returns values only for keys found, returns i.0 if no keys found.
adding or updating unboxed values will promote to boxed if internal values are boxed.
deep operations are supported, where typical kv right arguments (set add) will when provided with nested k1;(kv) :
will modify kv deeply with (k0 kv (keys;vals) set kvdata will set at k0 level.
get/del can access/del at infinte depth by appending (single key) path
Limitations:
values lists are stored as tables. If you attempt to store a higher shape than a table,
it is presumed to be a mistake.
linearize is a crutch to combine with "tableize" (monad ,.) to "fix" situations that might create/provide greater than table shapes prior to inclusion as a table.
kv does not use ,.@linearize combo in order to prevent non table keys/values.
set,set1,update,update1 present needlessly many options for extremely limited behaviour operation.
Behaviour that has a good argument for systemically preventing.
Behaviour deviances that I know how to fix easily.
update1 will add a key instead of updating when trying to add a boxed or numeric value to a string value table (+vice versa)
update and update1 will operate as set with autoboxing if adding a string or numeric value to a boxed value table.
Architecture considerations:
Non-unique mode (add1 instead of set) can provide 4x update throughput.
Using optimize every 1 to 5 seconds can serve a slightly out of date dataset to a wide audience with 100x access throughput on top of 4x update throughput.
keyed boxed arrays in a single dictionary provides keyed inverted table structure, or associated data as alternative to classes.
Using J native data offers a size and access performance benefit, and is encouraged.
Arrays/tables as key values makes J suitable for key-value oriented programs.
JSON implementation with kv should outperform current J implementations.
pD_z_ =: (1!:2&2) : (] [ (1!:2&2)@:(,&<))
myattr =: tosym 'sorted unique foreignkey foreignval'
pD d=: ('nums' kvbulk < 'field2 field3' kvbulk > 1 ; 0 1 0 0) kvadd ' descF' kvf 'descF field2' kvbulk 2 $ < myattr kvbulk _1 0 0 0
'set on empty dict. using gerund dsL call' pD 'dicts1 dicts2' kvbulk ,. (< kvEMPTY) kvset~ each ';'&cut`cut kvdsL each ('asdf`v' ; '2nd dict key with embedded spaces ` v2')
'transform numeric array with a symbol list into a dictionary ']&pD myattr kvbulk 'nums ` field2' kvd d
'dictionary to values' pD ,@kvvals myattr kvbulk 'nums ` field2' kvd d
d =: ('strs' kvbulk < cut kvdsL 'str1 str2 str3`g asdf xcvb') kvset d
((< 'str1 `ggg ' cut kvsetL 'strs' kv d) kvbulk~ 'strs') kvset d
'multidict' ]&pD d kvset~ kvbulk&.>(<@)/(>@)(>@) ( <'strs'),(tosym' str1 fds'),&< 'gg',:'fds'
'simple dsL add of deep misc`fields`values' ]&pD d =: 'misc ` str1 fds ` gg fds ' cut kvsetL d
'deep get strs ` str1 str2' pD 'strs ` str1 str2' kvd d
'use `misc vals to deep set strs' ]&pD (kvsetd~ 'strs' (kvbulk <) 'misc'&kv ) d
'subkey access str1 str2 for all if all dicts with kv"1' pD ,/ 'str1 str2' kv"1 (G0 kv ]) d
'subkey access str2 str1 with <@kv"1 and clean for empties' pD a: -.~ standardnull each 'str2 str1' <@(kv"1) (G0 kv ]) d
'subkey filter str2 str1 with <@kvf"1 returns list of dictionaries)' pD ('str2 str1' kvf"1 G0 kv ]) d
'subkey filter str2 str1 with <@kvf"1 adding back keys' pD (,@G0 kvbulk 'str2 str1' kvf"1 G0 kv ]) d
pD 'empty dictionary is 2$a:, but a filtered empty dictionary retains its original value shape'
pD 'if numbers mixed with strings, values are upgraded to boxes'
'add 2 numeric keys to all (last filtered) dictionaries with dsl ". kvsetL"1' pD 'a b ` 3 4' ". kvsetL"1 ( 'str2 str1' kvf"1 G0 kv ]) d
'make a mistake adding duplicate key' pD d =: ('misc' kvbulk1 123) kvadd1 d
'undo mistake... restore dict by deleting last key' pD d=: 'misc' kvdel d
'deep delete dic`misc`fds from `dic (masterdict over) d' pD 'dic` misc `fds fd 'kvdeld 'dic' kvbulk < d
output from kvtest run: (in raw/edit mode looks ok)
ββββββββ¬ββββββββββββββββββββ
β`descFβββββββββββββββββββββ
β`nums βββββββββββββββ¬βββ ββ
β βββ`sorted β_1β ββ
β βββ`unique β 0β ββ
β βββ`foreignkeyβ 0β ββ
β βββ`foreignvalβ 0β ββ
β βββββββββββββββ΄βββ ββ
β ββββββββββββββββββββ€β
β βββββββββββ¬ββββββββββ
β βββ`field2β1 0 0 0βββ
β βββ`field3β0 1 0 0βββ
β βββββββββββ΄ββββββββββ
β βββββββββββββββββββββ
ββββββββ΄ββββββββββββββββββββ
set on empty dict. using gerund dsL call: vvv
βββββββββ¬ββββββββββββββββββββββββββββββββββββββββββ
β`dicts1βββββββββββββββββββββββββββββββββββββββββββ
β`dicts2βββββββββ¬ββ ββ
β βββ`asdfβvβ ββ
β βββββββββ΄ββ ββ
β ββββββββββββββββββββββββββββββββββββββββββ€β
β ββββββββββββββββββββββββββββββββββββββ¬βββββ
β βββ`2nd dict key with embedded spacesβv2βββ
β ββββββββββββββββββββββββββββββββββββββ΄βββββ
β βββββββββββββββββββββββββββββββββββββββββββ
βββββββββ΄ββββββββββββββββββββββββββββββββββββββββββ
transform numeric array with a symbol list into a dictionary: vvv
βββββββββββββ¬ββ
β`sorted β1β
β`unique β0β
β`foreignkeyβ0β
β`foreignvalβ0β
βββββββββββββ΄ββ
dictionary to values: vvv
1 0 0 0
multidict: vvv
ββββββββ¬ββββββββββββββββββββ
β`descFβββββββββββββββββββββ
β`nums βββββββββββββββ¬βββ ββ
β`strs βββ`sorted β_1β ββ
β βββ`unique β 0β ββ
β βββ`foreignkeyβ 0β ββ
β βββ`foreignvalβ 0β ββ
β βββββββββββββββ΄βββ ββ
β ββββββββββββββββββββ€β
β βββββββββββ¬ββββββββββ
β βββ`field2β1 0 0 0βββ
β βββ`field3β0 1 0 0βββ
β βββββββββββ΄ββββββββββ
β ββββββββββββββββββββ€β
β βββββββββ¬ββββ ββ
β βββ`str1βgg β ββ
β βββ`fds βfdsβ ββ
β βββββββββ΄ββββ ββ
β βββββββββββββββββββββ
ββββββββ΄ββββββββββββββββββββ
simple dsL add of deep misc`fields`values: vvv
ββββββββ¬ββββββββββββββββββββ
β`descFβββββββββββββββββββββ
β`nums βββββββββββββββ¬βββ ββ
β`strs βββ`sorted β_1β ββ
β`misc βββ`unique β 0β ββ
β βββ`foreignkeyβ 0β ββ
β βββ`foreignvalβ 0β ββ
β βββββββββββββββ΄βββ ββ
β ββββββββββββββββββββ€β
β βββββββββββ¬ββββββββββ
β βββ`field2β1 0 0 0βββ
β βββ`field3β0 1 0 0βββ
β βββββββββββ΄ββββββββββ
β ββββββββββββββββββββ€β
β βββββββββ¬βββββ ββ
β βββ`str1βg β ββ
β βββ`str2βasdfβ ββ
β βββ`str3βxcvbβ ββ
β βββββββββ΄βββββ ββ
β ββββββββββββββββββββ€β
β βββββββββ¬ββββ ββ
β βββ`str1βgg β ββ
β βββ`fds βfdsβ ββ
β βββββββββ΄ββββ ββ
β βββββββββββββββββββββ
ββββββββ΄ββββββββββββββββββββ
deep get strs ` str1 str2: vvv
g
asdf
use `misc vals to deep set strs: vvv
ββββββββ¬ββββββββββββββββββββ
β`descFβββββββββββββββββββββ
β`nums βββββββββββββββ¬βββ ββ
β`strs βββ`sorted β_1β ββ
β`misc βββ`unique β 0β ββ
β βββ`foreignkeyβ 0β ββ
β βββ`foreignvalβ 0β ββ
β βββββββββββββββ΄βββ ββ
β ββββββββββββββββββββ€β
β βββββββββββ¬ββββββββββ
β βββ`field2β1 0 0 0βββ
β βββ`field3β0 1 0 0βββ
β βββββββββββ΄ββββββββββ
β ββββββββββββββββββββ€β
β βββββββββ¬βββββ ββ
β βββ`str1βgg β ββ
β βββ`str2βasdfβ ββ
β βββ`str3βxcvbβ ββ
β βββ`fds βfds β ββ
β βββββββββ΄βββββ ββ
β ββββββββββββββββββββ€β
β βββββββββ¬ββββ ββ
β βββ`str1βgg β ββ
β βββ`fds βfdsβ ββ
β βββββββββ΄ββββ ββ
β βββββββββββββββββββββ
ββββββββ΄ββββββββββββββββββββ
subkey access str1 str2 for all if all dicts with kvget"1: vvv
g
asdf
gg
subkey access str2 str1 with <@kvget"1 and clean for empties: vvv
ββββββ¬ββββ
βasdfβgg β
βg β β
ββββββ΄ββββ
subkey filter str2 str1 with <@kvfilt"1 returns list of dictionaries): vvv
βββββββ¬βββββ
βββββββΌβββββ€
βββββββΌβββββ€
β`str2βasdfβ
β`str1βg β
βββββββΌβββββ€
β`str1βgg β
βββββββ΄βββββ
subkey filter str2 str1 with <@kvfilt"1 adding back keys: vvv
ββββββββ¬βββββββββββββ
β`descFββββββββ¬ββββββ
β`nums ββββββββΌβββββ€β
β`strs ββββββββΌβββββ€β
β`misc ββ`str2βasdfββ
β ββ`str1βg ββ
β ββββββββΌβββββ€β
β ββ`str1βgg ββ
β ββββββββ΄ββββββ
ββββββββ΄βββββββββββββ
empty dictionary is "2$ <,.i.0", but a filtered empty dictionary retains its original value shape
if numbers mixed with strings, values are upgraded to boxes
add 2 numeric keys to all (last filtered) dictionaries with dsl ". kvsetL"1: vvv
βββββββ¬ββββββββ
β`a β3 β
β`b β4 β
βββββββΌββββββββ€
β`a β3 0 0 0β
β`b β4 0 0 0β
βββββββΌββββββββ€
β`str2βββββββ β
β`str1ββasdfβ β
β`a βββββββ€ β
β`b ββg β β
β βββββββ€ β
β ββ3 β β
β βββββββ€ β
β ββ4 β β
β βββββββ β
βββββββΌββββββββ€
β`str1ββββββ β
β`a ββgg β β
β`b ββββββ€ β
β ββ3 β β
β ββββββ€ β
β ββ4 β β
β ββββββ β
βββββββ΄ββββββββ
make a mistake adding duplicate key: vvv
ββββββββ¬ββββββββββββββββββββ
β`descFβββββββββββββββββββββ
β`nums βββββββββββββββ¬βββ ββ
β`strs βββ`sorted β_1β ββ
β`misc βββ`unique β 0β ββ
β`misc βββ`foreignkeyβ 0β ββ
β βββ`foreignvalβ 0β ββ
β βββββββββββββββ΄βββ ββ
β ββββββββββββββββββββ€β
β βββββββββββ¬ββββββββββ
β βββ`field2β1 0 0 0βββ
β βββ`field3β0 1 0 0βββ
β βββββββββββ΄ββββββββββ
β ββββββββββββββββββββ€β
β βββββββββ¬βββββ ββ
β βββ`str1βg β ββ
β βββ`str2βasdfβ ββ
β βββ`str3βxcvbβ ββ
β βββββββββ΄βββββ ββ
β ββββββββββββββββββββ€β
β βββββββββ¬ββββ ββ
β βββ`str1βgg β ββ
β βββ`fds βfdsβ ββ
β βββββββββ΄ββββ ββ
β ββββββββββββββββββββ€β
β ββ123 ββ
β βββββββββββββββββββββ
ββββββββ΄ββββββββββββββββββββ
undo mistake... restore dict by deleting last key: vvv
ββββββββ¬ββββββββββββββββββββ
β`descFβββββββββββββββββββββ
β`nums βββββββββββββββ¬βββ ββ
β`strs βββ`sorted β_1β ββ
β`misc βββ`unique β 0β ββ
β βββ`foreignkeyβ 0β ββ
β βββ`foreignvalβ 0β ββ
β βββββββββββββββ΄βββ ββ
β ββββββββββββββββββββ€β
β βββββββββββ¬ββββββββββ
β βββ`field2β1 0 0 0βββ
β βββ`field3β0 1 0 0βββ
β βββββββββββ΄ββββββββββ
β ββββββββββββββββββββ€β
β βββββββββ¬βββββ ββ
β βββ`str1βg β ββ
β βββ`str2βasdfβ ββ
β βββ`str3βxcvbβ ββ
β βββββββββ΄βββββ ββ
β ββββββββββββββββββββ€β
β βββββββββ¬ββββ ββ
β βββ`str1βgg β ββ
β βββ`fds βfdsβ ββ
β βββββββββ΄ββββ ββ
β βββββββββββββββββββββ
ββββββββ΄ββββββββββββββββββββ
deep delete dic`misc`fds from `dic (masterdict over) d: vvv
ββββββ¬βββββββββββββββββββββββββββββββ
β`dicββββββββββββββββββββββββββββββββ
β ββββββββββ¬ββββββββββββββββββββββ
β βββ`descFβββββββββββββββββββββββ
β βββ`nums βββββββββββββββ¬βββ ββββ
β βββ`strs βββ`sorted β_1β ββββ
β βββ`misc βββ`unique β 0β ββββ
β βββ βββ`foreignkeyβ 0β ββββ
β βββ βββ`foreignvalβ 0β ββββ
β βββ βββββββββββββββ΄βββ ββββ
β βββ ββββββββββββββββββββ€βββ
β βββ βββββββββββ¬ββββββββββββ
β βββ βββ`field2β1 0 0 0βββββ
β βββ βββ`field3β0 1 0 0βββββ
β βββ βββββββββββ΄ββββββββββββ
β βββ ββββββββββββββββββββ€βββ
β βββ βββββββββ¬βββββ ββββ
β βββ βββ`str1βg β ββββ
β βββ βββ`str2βasdfβ ββββ
β βββ βββ`str3βxcvbβ ββββ
β βββ βββββββββ΄βββββ ββββ
β βββ ββββββββββββββββββββ€βββ
β βββ βββββββββ¬ββββ ββββ
β βββ βββ`str1βgg β ββββ
β βββ βββββββββ΄ββββ ββββ
β βββ βββββββββββββββββββββββ
β ββββββββββ΄ββββββββββββββββββββββ
β ββββββββββββββββββββββββββββββββ
ββββββ΄βββββββββββββββββββββββββββββββ
create inverted table: vvv
βββββββββ¬βββββββββββββ
β`Id ββββββββββββββ
β`Name ββ3 ββ
β`Job ββ6 ββ
β`Statusββ5 ββ
β ββ1 ββ
β βββββββββββββ€β
β ββJerry ββ
β ββJan ββ
β ββFrieda ββ
β ββAlex ββ
β βββββββββββββ€β
β ββUnemployedββ
β ββCEO ββ
β ββstudent ββ
β ββWaiter ββ
β βββββββββββββ€β
β ββMarried ββ
β ββMarried ββ
β ββSingle ββ
β ββSeparated ββ
β ββββββββββββββ
βββββββββ΄βββββββββββββ
βββββββββββββββββββββ¬ββ
βdsL version matchesβ1β
βββββββββββββββββββββ΄ββ
itdisplay(selected fields) query on Job -:(padded) 'CEO' or 'student' : vvv
βββββ¬βββββββ¬βββββββββββ
β`Idβ`Name β`Job β
βββββΌβββββββΌβββββββββββ€
β6 βJan βCEO β
β5 βFriedaβstudent β
βββββ΄βββββββ΄βββββββββββ
dsL (; separated "keys") version of same query as kv: vvv
βββββββββ¬βββββββββββββ
β`Id ββββββββββββββ
β`Name ββ6 ββ
β`Job ββ5 ββ
β`Statusβββββββββββββ€β
β ββJan ββ
β ββFrieda ββ
β βββββββββββββ€β
β ββCEO ββ
β ββstudent ββ
β βββββββββββββ€β
β ββMarried ββ
β ββSingle ββ
β ββββββββββββββ
βββββββββ΄βββββββββββββ
add inverted table to "main" dic: vvv
ββββββββ¬βββββββββββββββββββββββββ
β`descFββββββββββββββββββββββββββ
β`nums βββββββββββββββ¬βββ ββ
β`strs βββ`sorted β_1β ββ
β`misc βββ`unique β 0β ββ
β`it βββ`foreignkeyβ 0β ββ
β βββ`foreignvalβ 0β ββ
β βββββββββββββββ΄βββ ββ
β βββββββββββββββββββββββββ€β
β βββββββββββ¬ββββββββ ββ
β βββ`field2β1 0 0 0β ββ
β βββ`field3β0 1 0 0β ββ
β βββββββββββ΄ββββββββ ββ
β βββββββββββββββββββββββββ€β
β βββββββββ¬βββββ ββ
β βββ`str1βg β ββ
β βββ`str2βasdfβ ββ
β βββ`str3βxcvbβ ββ
β βββββββββ΄βββββ ββ
β βββββββββββββββββββββββββ€β
β βββββββββ¬ββββ ββ
β βββ`str1βgg β ββ
β βββ`fds βfdsβ ββ
β βββββββββ΄ββββ ββ
β βββββββββββββββββββββββββ€β
β βββββββββββ¬βββββββββββββββ
β βββ`Id ββββββββββββββββ
β βββ`Name ββ3 ββββ
β βββ`Job ββ6 ββββ
β βββ`Statusββ5 ββββ
β βββ ββ1 ββββ
β βββ βββββββββββββ€βββ
β βββ ββJerry ββββ
β βββ ββJan ββββ
β βββ ββFrieda ββββ
β βββ ββAlex ββββ
β βββ βββββββββββββ€βββ
β βββ ββUnemployedββββ
β βββ ββCEO ββββ
β βββ ββstudent ββββ
β βββ ββWaiter ββββ
β βββ βββββββββββββ€βββ
β βββ ββMarried ββββ
β βββ ββMarried ββββ
β βββ ββSingle ββββ
β βββ ββSeparated ββββ
β βββ ββββββββββββββββ
β βββββββββββ΄βββββββββββββββ
β ββββββββββββββββββββββββββ
ββββββββ΄βββββββββββββββββββββββββ
Benchmark for 1m keys/values create/optimize/search
bench_kvtest_~ 1000000
ββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββ
βcreate ?.x$y keys/vals ignoring duplicatesβ0.467815 1.87771e8β
ββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββ
βββββββββββββββββββββββ¬ββββββββββββββββββββ
βuniquify on last stepβ0.0233238 2.51676e7β
βββββββββββββββββββββββ΄ββββββββββββββββββββ
βββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β30 keysβ35128 462151 33398 101000 455991 444063 693381 733962 192982 194438 451320 226701 822320 565878 625418 316363 110354 725930 680443 84347 355455 102665 788146 838954 990780 944237 892594 949868 446740 673026β
βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββ¬ββββββββββββββββββββ
βuniquify and optimizeβ0.0274095 2.51766e7β
βββββββββββββββββββββββ΄ββββββββββββββββββββ
βββββββββββββββββββββββββββββββ¬ββββββββββββ
βrandom 30key optimized accessβ4.9e_6 5888β
βββββββββββββββββββββββββββββββ΄ββββββββββββ
βββββββββββββββββββββββββββββββ¬ββββββββββββββββββββ
βsame 30key unoptimized accessβ0.0027556 4.19658e6β
βββββββββββββββββββββββββββββββ΄ββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββ
βcreate 100000 key/vals (uniquified) in range of 2*y so half are new half are existingβ0.114918 5.36975e7β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββ
βset (update or add depending on existing status of key) 100000 keys/vals into first kvβ0.0214939 5.11204e7β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββ