Thomas Fischbacher <[EMAIL PROTECTED]> writes:

> On Fri, 19 Mar 2004, Ivan Boldyrev wrote:
> 
> > Are there (CMUCL-specific) functions for fast fixnum arithmetics? 
> > I don't need bignum arifmethics; for example,
> > 
> > (fixnum+ most-positive-fixnum 1)
> > 
> > should retrun -1.
[...]
> my approach to this is to put a few macros into my own spellbook (google 
> for cl-tf-spellbook, the university's webserver is down today, but you may 
> have luck finding it in the Google cache) that expand, say, i+ to
> (the fixnum (+ (the fixnum arg1) (the fixnum arg2) ...)
> If you compile this with (declare (optimize (safety 0) (speed 3))), it 
> just gives you what you want.

Not quite. It works if the result of ordinary CL:+ is _really_ FIXNUM,
but if you try to lie the compiler, mysterious failures may appear.

-- 
Regards,
Alexey Dejneka

"Alas, the spheres of truth are less transparent than those of
illusion." -- L.E.J. Brouwer

Reply via email to