At Mon, 3 Mar 2014 08:35:42 -0500, Sam Tobin-Hochstadt wrote: > A few questions about this: > > 1. Why not keep the 7x faster version as the fallback?
I expect the fallback to be almost never used, and so it would be lots of `unsafe-...` calls to worry about with almost no benefit. > 2. How much of the performance difference is 31/63-bit integers vs the > C code using 32/64 bit? My guesses (for 64-bit Racket): About half, where the other half is poor use of registers by the JIT. > 3. I think you could have used `define-inline` from > `racket/performance-hint` here. Yes, but it pulls in more dependencies than I wanted here. > On Mon, Mar 3, 2014 at 7:55 AM, <mfl...@racket-lang.org> wrote: > > > > ~~~~~~~~~~ > > > > 7e546d1 Matthew Flatt <mfl...@racket-lang.org> 2014-03-02 17:46 > > : > > | file/md5: faster > > | > > | Use unsafe operations and forced inlining to speed up > > | MD5 calculation by about x2.25 on 32-bit platforms, and > > | use all that plus fixnums to speed up by about x7 on > > | 64-bit platforms. > > | > > | This implementation is still about a factor of 5 off > > | a C implementation. So, while this was a fun little > > | experiment, I'll revert this commit and add a binding > > | to the OpenSSL MD5 implementation, instead. > > : > > M racket/collects/file/md5.rkt | 520 > +++++++++++++++++++++++++++------------- > _________________________ > Racket Developers list: > http://lists.racket-lang.org/dev _________________________ Racket Developers list: http://lists.racket-lang.org/dev