Subject: Re: Performance tuning
From: Erik Naggum <erik@naggum.net>
Date: 2000/12/04
Newsgroups: comp.lang.lisp
Message-ID: <3184953833736032@naggum.net>

* Greg Menke <gregm-news.xyz@zxy.mindspring.com>
| For practice I just implemented a md5 hashing routine, it works but is
| quite slow.

  To make MD5 perform reasonably fast, you need access to machine
  integers and rotate instructions.  MD5 looks like it was designed by
  someone who wrote in assembler on a machine with more registers than
  your average Intel, and it hurts to make that perform in Common Lisp.
  I decided to split the integers in half to get them within fixnum
  range (the Emacs Lisp implementation has made a similar decision), but
  also to write directly into a preallocated bignum rather than an array
  because some critical operations were faster that way.  (An annoying
  "feature" with MD5 is that its operations are all within 32-bit words,
  so there's very little to be gained from bignum support.)

#:Erik
-- 
  "When you are having a bad day and it seems like everybody is trying
   to piss you off, remember that it takes 42 muscles to produce a
   frown, but only 4 muscles to work the trigger of a good sniper rifle."
								-- Unknown