2 USING: compiler hashtables kernel math memory namespaces
3 sequences strings test ;
5 : hash-bench-step ( hash elt -- )
7 { [ dup 0 = ] [ drop dup rot set-hash ] }
8 { [ dup 1 = ] [ drop swap remove-hash ] }
9 { [ dup 2 = ] [ drop swap hash drop ] }
12 : hashtable-benchmark ( seq -- )
13 10000 <hashtable> swap 10 [
22 [ ] [ [ string? ] instances hashtable-benchmark ] unit-test