[Nix-dev] faster printHash32

Yury G. Kudryashov urkud.urkud at gmail.com
Sun Sep 4 09:45:14 CEST 2011


Hi!

Current printHash32 implementation does some long arithmetic, thus it is 
*very* slow. The attached patch makes printHash32 10 times faster on my 
laptop.

I attach a patch that makes parseHash32 3 times faster but the new version 
does not check if there any trailing non-zero bits in the input yet. I'm 
going to change it in a few days (have no time today).

BTW, my printHash32 is 3 times faster than my parseHash32. Any ideas why?
-- 
Yury G. Kudryashov,
mailto: urkud at mccme.ru
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fast-hash-print.patch
Type: text/x-patch
Size: 2382 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20110904/ab054cb9/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fast-parseHash32.patch
Type: text/x-patch
Size: 3156 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20110904/ab054cb9/attachment-0001.bin 


More information about the nix-dev mailing list