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

* Robert Monfera <monfera@fisec.com>
| Did you use a rather low-level direct access to parts of a bignum, or
| maybe there are some standard functions that mutate a bignum, avoiding
| consing (which I expected + and some other arithmetic operations could
| do, but when I looked, they couldn't)?

  Allegro CL offers a function sys:memref that becomes machine code
  which simply accesses the memory given as arguments.  I used it to get
  at the individual bigits.  There are no standard functions to mutate
  bignums that I know of.  Moreover, bignums take up only as many bigits
  as they need, so I had to use a "sentinel" bit to get bignums big
  enough that I didn't have to test for the proper size of the bignum.
  So, yes, this is rather low-level direct access to parts of a bignum.

#: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