compiler.tree.propagation.transforms: tweak 2^ transform to fix performance regression in benchmark.beust2; introduced by 47d6507548

release
Slava Pestov 2010-02-16 01:03:09 +13:00
parent cd1986a906
commit 64a37d2db6
1 changed files with 2 additions and 5 deletions

View File

@ -103,13 +103,10 @@ IN: compiler.tree.propagation.transforms
! Speeds up 2^ ! Speeds up 2^
: 2^? ( #call -- ? ) : 2^? ( #call -- ? )
in-d>> first2 [ value-info ] bi@ in-d>> first value-info literal>> 1 eq? ;
[ { [ literal>> 1 = ] [ class>> fixnum class<= ] } 1&& ]
[ class>> fixnum class<= ]
bi* and ;
\ shift [ \ shift [
2^? [ 2^? [
cell-bits tag-bits get - 1 - cell-bits tag-bits get - 1 -
'[ '[
>fixnum dup 0 < [ 2drop 0 ] [ >fixnum dup 0 < [ 2drop 0 ] [