Skip to content

Commit 1a817ef

Browse files
committed
gdic
1 parent 733d662 commit 1a817ef

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

test/gdic.ijs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ NB. obsolete assert. (1) 16!:_7 dict__y
88
NB. obsolete EMPTY
99
NB. obsolete )
1010

11+
c1=: 9!:36 ''
12+
9!:37[ 0 10000 0 10000
13+
1114
require 'data/dictionary'
1215

1316
cocurrent 'base'
@@ -303,13 +306,19 @@ for. i. n_iter do.
303306
NB. Put.
304307
keys =. (batchshape , keyshape) genkey"0@$ 0
305308
vals =. (batchshape , valshape) genval"0@$ 0
309+
echo 'put:'
310+
echo 5!:5<'keys'
311+
echo 5!:5<'vals'
306312
vals put__naivedict"(valrank , keyrank) keys
307313
assert. EMPTY -: vals put__x keys
308314
NB. obsolete 'put'dumpchk x
309315
assert. (count__x '') -: count__naivedict ''
310316
NB. Get.
311317
keys =. (batchshape , keyshape) genkey"0@$ 0
312318
vals =. (batchshape , valshape) genval"0@$ 0
319+
echo 'get:'
320+
echo 5!:5<'keys'
321+
echo 5!:5<'vals'
313322
naivemask =. has__naivedict"keyrank keys
314323
jhasans =. has__x keys
315324
assert. jhasans -: naivemask
@@ -327,10 +336,14 @@ NB. obsolete 'get'dumpchk x
327336
NB. Delete.
328337
batchshapefordel =. <. -: batchshape
329338
keys =. (batchshapefordel , keyshape) genkey"0@$ 0
339+
echo 'del:'
340+
echo 5!:5<'keys'
330341
naivemask =. has__naivedict"keyrank keys
331342
del__naivedict"keyrank keys
332343
jdelans =. del__x keys
333344
NB. obsolete 'del'dumpchk x
345+
echo 'count__x:',":count__x ''
346+
echo 'count__:naivedict ',":count__naivedict''
334347
assert. (count__x '') -: count__naivedict ''
335348
assert. jdelans -: naivemask *. batchshapefordel ($ ,) ~:&.|. (_ , keyshape) ($ ,) keys
336349
end.
@@ -644,6 +657,7 @@ set_threads 0
644657
EMPTY
645658
}}^:((2 *@(17 b.) 9!:56'MEMAUDIT') < (9!:56'PYXES') *. 0=dbq'') ''
646659

660+
9!:37 c1
647661

648662
epilog''
649663

0 commit comments

Comments
 (0)