Hello, John! 21.09.2015, 22:23, "John Benediktsson" <mrj...@gmail.com>: > I don't know what version of Factor you are using, but I made a couple > improvements improvements to sha checksums over the last year or two.
Right! I keep forgetting that I'm on 0.96, which is wildly out of date, apparently. > I can hash a 17 mb file in 4.5 seconds on my laptop: That sounds quite a bit more reasonable. > There is still a lot of optimization potential because it doesn't inline > fixnum arithmetic completely on 64-bit. I was working on it awhile ago and > didn't quite finish. I'm on 32 bit for now, so it shouldn't affect me. > If you really need performance now, here's another way that calls out to > ``shasum`` and is fast. > > : shasum ( path -- checksum ) > absolute-path { "shasum" "-a" "256" } swap suffix > utf8 [ readln ] with-process-reader " " split1 drop ; > > IN: scratchpad [ "~/testfile" shasum ] time > Running time: 0.206797194 seconds > > Hope that helps. Actually, that helps immensely! Thank you very much! ---=====--- Александр ------------------------------------------------------------------------------ _______________________________________________ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk