From 73a990a4b80b8440483c34a9a267a2b9299c6bb0 Mon Sep 17 00:00:00 2001 From: Daniel Ehrenberg Date: Fri, 26 Feb 2010 13:24:26 -0500 Subject: [PATCH] Making it fast to create a new hashset --- basis/compiler/tree/propagation/transforms/transforms.factor | 1 + core/hash-sets/hash-sets.factor | 1 + 2 files changed, 2 insertions(+) diff --git a/basis/compiler/tree/propagation/transforms/transforms.factor b/basis/compiler/tree/propagation/transforms/transforms.factor index d4e5e25ffe..b6fda4d5b9 100644 --- a/basis/compiler/tree/propagation/transforms/transforms.factor +++ b/basis/compiler/tree/propagation/transforms/transforms.factor @@ -135,6 +135,7 @@ IN: compiler.tree.propagation.transforms in-d>> first value-info literal>> { { V{ } [ [ drop { } 0 vector boa ] ] } { H{ } [ [ drop 0 ] ] } + { HS{ } [ [ drop f fast-set ] ] } [ drop f ] } case ] "custom-inlining" set-word-prop diff --git a/core/hash-sets/hash-sets.factor b/core/hash-sets/hash-sets.factor index 3c0acd46c4..52b883195e 100644 --- a/core/hash-sets/hash-sets.factor +++ b/core/hash-sets/hash-sets.factor @@ -22,6 +22,7 @@ M: hash-set clone table>> clone hash-set boa ; M: sequence fast-set ; +M: f fast-set drop H{ } clone hash-set boa ; M: sequence duplicates HS{ } clone [ [ in? ] [ adjoin ] 2bi ] curry filter ;