remove >bignum in crc32 -- 2x faster on both 32 and 64bit
parent
17607941b9
commit
249601618b
|
@ -12,12 +12,12 @@ CONSTANT: crc32-table V{ }
|
||||||
256 iota [
|
256 iota [
|
||||||
8 [
|
8 [
|
||||||
[ 2/ ] [ even? ] bi [ crc32-polynomial bitxor ] unless
|
[ 2/ ] [ even? ] bi [ crc32-polynomial bitxor ] unless
|
||||||
] times >bignum
|
] times
|
||||||
] map 0 crc32-table copy
|
] map 0 crc32-table copy
|
||||||
|
|
||||||
: (crc32) ( crc ch -- crc )
|
: (crc32) ( crc ch -- crc )
|
||||||
>bignum dupd bitxor
|
dupd bitxor
|
||||||
mask-byte crc32-table nth-unsafe >bignum
|
mask-byte crc32-table nth-unsafe
|
||||||
swap -8 shift bitxor ; inline
|
swap -8 shift bitxor ; inline
|
||||||
|
|
||||||
SINGLETON: crc32
|
SINGLETON: crc32
|
||||||
|
|
Loading…
Reference in New Issue