Subject: gcd problem / really bignums for exponents
From: Richard Fateman
Date: Wed, 14 Feb 2007 09:21:57 -0800
In Allegro CL, and I suspect in some others, numbers up to about 2^29 are
encoded immediately ("in the pointer"). For 64 bit implementations it
presumably has a different fixnum limit.
The compiler knows about fixnum overflow, and only ignores it if you insist.
_____
From: macrakis at gmail.com [mailto:macrakis at gmail.com] On Behalf Of Stavros
Macrakis
Sent: Wednesday, February 14, 2007 7:06 AM
To: fateman at cs.berkeley.edu
Cc: maxima at math.utexas.edu
Subject: Re: [Maxima] gcd problem / really bignums for exponents
..
As for the speed issue, there may be easy ways to fix it. I don't know how
fixnums and f+ work on the various Lisps we run on (are fixnums allocated on
the heap, or encoded in the Lisp object itself?), but I remember making a
very very simple change in MacLisp many years ago which special-cased the
fixnum+fixnum case of generic + and sped up CRE calculations globally by a
measurable amount (15%, from memory). Believe it or not, in those days,
memory was so scarce (and the aesthetic of programming opposed to
special-casing) that we didn't incorporate the extra 15 words of code into
the production system.
-s