]> gitweb.factorcode.org Git - factor.git/commitdiff
Making it fast to create a new hashset
authorDaniel Ehrenberg <littledan@Macintosh-122.local>
Fri, 26 Feb 2010 18:24:26 +0000 (13:24 -0500)
committerDaniel Ehrenberg <littledan@Macintosh-122.local>
Fri, 26 Feb 2010 18:24:26 +0000 (13:24 -0500)
basis/compiler/tree/propagation/transforms/transforms.factor
core/hash-sets/hash-sets.factor

index d4e5e25ffeee533b2d3131e5a611de2da4535fdf..b6fda4d5b982e900be9040b7f69288dc8ed4bb3b 100644 (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
index 3c0acd46c41713a800728af9f7337fe3e3471c60..52b883195ecc351fa338806120acee33a92cc091 100644 (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 ;