sets: reverting push-unsafe change for now, seems to slow it down a little?
parent
e0e12fd5ea
commit
d6053dd81e
|
@ -1,7 +1,6 @@
|
||||||
! Copyright (C) 2010 Daniel Ehrenberg
|
! Copyright (C) 2010 Daniel Ehrenberg
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: assocs hashtables growable.private kernel math sequences
|
USING: assocs hashtables kernel math sequences vectors ;
|
||||||
vectors ;
|
|
||||||
FROM: assocs => change-at ;
|
FROM: assocs => change-at ;
|
||||||
IN: sets
|
IN: sets
|
||||||
|
|
||||||
|
@ -102,7 +101,7 @@ M: set all-unique? drop t ;
|
||||||
|
|
||||||
: (pruned) ( elt set accum -- )
|
: (pruned) ( elt set accum -- )
|
||||||
2over in? [ 3drop ] [
|
2over in? [ 3drop ] [
|
||||||
[ drop adjoin ] [ nip push-unsafe ] 3bi
|
[ drop adjoin ] [ nip push ] 3bi
|
||||||
] if ; inline
|
] if ; inline
|
||||||
|
|
||||||
: pruned ( seq -- newseq )
|
: pruned ( seq -- newseq )
|
||||||
|
|
Loading…
Reference in New Issue