I noticed the recent effort to optimize SHA-1 in Fossil, and it crossed my mind that we can use OpenSSL implementation (which seem to be heavily optimized), since we already link it when FOSSIL_ENABLE_SSL is defined, and fall back to the current implementation if Fossil is not linked without OpenSSL.
My simple performance test of SHA-1 from checkin [f2ede7da6d] vs OpenSSL shows that the latter is a bit faster: $ time ./fossil sha1sum ~/Downloads/FreeBSD-8.2-RELEASE-i386-disc1.iso Current implementation: real 0m3.549s user 0m3.232s sys 0m0.315s OpenSSL implementation: real 0m3.017s user 0m2.699s sys 0m0.316s Compiler: i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00) The diff is very simple -- just a couple of defines; I have attached it. -- Dmitry Chestnykh
openssl-sha-md5.diff
Description: Binary data
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users