From ... From: Erik Naggum Subject: Re: Performance tuning Date: 2000/12/05 Message-ID: <3185025504930095@naggum.net>#1/1 X-Deja-AN: 701443564 References: <3184953833736032@naggum.net> <3A2C7C38.4F68956A@fisec.com> mail-copies-to: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 976040221 20955 195.0.192.66 (5 Dec 2000 18:17:01 GMT) Organization: Naggum Software; vox: +47 800 35477; gsm: +47 93 256 360; fax: +47 93 270 868; http://naggum.no; http://naggum.net User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 Mime-Version: 1.0 NNTP-Posting-Date: 5 Dec 2000 18:17:01 GMT Newsgroups: comp.lang.lisp * Robert Monfera | 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