hashtables: faster keys and values on hashtables.

db4
John Benediktsson 2013-04-06 21:20:07 -07:00
parent 9926c205a5
commit a58c8ecc03
1 changed files with 10 additions and 0 deletions

View File

@ -162,6 +162,16 @@ M: hashtable >alist
[ [ 2array ] dip push-unsafe ] curry each-pair
] keep { } like ;
M: hashtable keys
[ array>> ] [ assoc-size <vector> ] bi [
[ nip push-unsafe ] curry each-pair
] keep { } like ;
M: hashtable values
[ array>> ] [ assoc-size <vector> ] bi [
[ [ drop ] 2dip push-unsafe ] curry each-pair
] keep { } like ;
M: hashtable clone
(clone) [ clone ] change-array ; inline