]> gitweb.factorcode.org Git - factor.git/commitdiff
remove >bignum in crc32 -- 2x faster on both 32 and 64bit
authorDoug Coleman <erg@jobim.local>
Tue, 5 May 2009 02:27:14 +0000 (21:27 -0500)
committerDoug Coleman <erg@jobim.local>
Tue, 5 May 2009 02:27:14 +0000 (21:27 -0500)
core/checksums/crc32/crc32.factor

index 7655ec84824a84e364034d6c772056a8073145b1..209de83763801b4877271874dc0029c050131697 100644 (file)
@@ -12,12 +12,12 @@ CONSTANT: crc32-table V{ }
 256 iota [
     8 [
         [ 2/ ] [ even? ] bi [ crc32-polynomial bitxor ] unless
-    ] times >bignum
+    ] times
 ] map 0 crc32-table copy
 
 : (crc32) ( crc ch -- crc )
-    >bignum dupd bitxor
-    mask-byte crc32-table nth-unsafe >bignum
+    dupd bitxor
+    mask-byte crc32-table nth-unsafe
     swap -8 shift bitxor ; inline
 
 SINGLETON: crc32