math.integers: speedup to fixnum-bit?.

db4
John Benediktsson 2015-06-07 11:07:58 -07:00
parent 02b7022390
commit d60d098c11
1 changed files with 4 additions and 2 deletions

View File

@ -51,8 +51,10 @@ M: fixnum shift integer>fixnum fixnum-shift ; inline
M: fixnum bitnot fixnum-bitnot ; inline
: fixnum-bit? ( n m -- b )
neg shift 1 bitand zero? not ; inline
: fixnum-bit? ( x n -- ? )
integer>fixnum dup 0 >= [
neg fixnum-shift-fast even? not
] [ 2drop f ] if ; inline
M: fixnum bit? fixnum-bit? ; inline