Making it fast to create a new hashset

db4
Daniel Ehrenberg 2010-02-26 13:24:26 -05:00
parent 366f36d73f
commit 73a990a4b8
2 changed files with 2 additions and 0 deletions
basis/compiler/tree/propagation/transforms
core/hash-sets

View File

@ -135,6 +135,7 @@ IN: compiler.tree.propagation.transforms
in-d>> first value-info literal>> {
{ V{ } [ [ drop { } 0 vector boa ] ] }
{ H{ } [ [ drop 0 <hashtable> ] ] }
{ HS{ } [ [ drop f fast-set ] ] }
[ drop f ]
} case
] "custom-inlining" set-word-prop

View File

@ -22,6 +22,7 @@ M: hash-set clone
table>> clone hash-set boa ;
M: sequence fast-set <hash-set> ;
M: f fast-set drop H{ } clone hash-set boa ;
M: sequence duplicates
HS{ } clone [ [ in? ] [ adjoin ] 2bi ] curry filter ;