1 : bucket
-count
( -- bkcount
) 1 wlist
-hash
-bits lshift
;
6 : count
-bucket
-items
( bkptr
-- )
15 : show
-stats
( vocid
-- )
16 dup vocid
->htable
to buckets
17 dup vocid
-hashed? ifnot
0 to buckets
endif
23 [: drop word
-count
1+! false
;] foreach
-word drop
25 ." -- " word
-count @
. ." words, "
28 0 0x7fff_ffff \ max and min in bucket
31 i cells buckets
+ count
-bucket
-items
34 1+ \ update total used
41 ;; ( bkmin bkmax bkused
)
42 nrot
2dup
2>r rot \
for average
43 0 .r
." /" bucket
-count
. ." buckets, " . ." min, " . ." max, average per bucket: "
52 [: ( vocid
-- endflag
)
60 vocid
-of forth show
-stats
61 [IFDEF
] c4s vocid
-of c4s show
-stats
[ENDIF]
62 [IFDEF
] prng vocid
-of prng show
-stats
[ENDIF]
63 [IFDEF
] disx86 vocid
-of disx86 show
-stats
[ENDIF]
64 [IFDEF
] asmx86 vocid
-of asmx86 show
-stats
[ENDIF]
65 [IFDEF
] asmx86
:lexer vocid
-of asmx86
:lexer show
-stats
[ENDIF]
66 [IFDEF
] asmx86
:instructions vocid
-of asmx86
:instructions show
-stats
[ENDIF]
67 [IFDEF
] asm
-labman vocid
-of asm
-labman show
-stats
[ENDIF]
68 [IFDEF
] asm
-meta vocid
-of asm
-meta show
-stats
[ENDIF]