[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] RE: algebra Makefiles with explicit dependencies,

From: Stephen Wilson
Subject: Re: [Axiom-developer] RE: algebra Makefiles with explicit dependencies, bootstrap, fixed-points etc.
Date: Mon, 17 Jan 2005 13:39:45 -0500
User-agent: Mutt/1.5.6+20040907i


I compleatly fine with the fixnum declaration. We just need to make
sure it is a rule programmers can rely on. Consider:

)abbrev package ITER Iter
Iter(): E == I where
  E == with
    iter: () -> Void
  I == add
    iter(): Void == 
      for i in 2.. repeat

The relavent lisp decalres we are using fixnums:

      (LETT |i| (QSADD1 |i|) |ITER;iter;V;1|)

Now compile the above with a lower bound of 3:

      for i in 3.. repeat

We get generic arithmetic:

      (LETT |i| (+ |i| 1) |ITER;iter;V;1|)


On Mon, Jan 17, 2005 at 12:23:36PM -0500, root wrote:
> Steve,
> I don't know if there is an actual statement to the effect that
> the upper bound on a loop would be a register-sized number (32
> or 64 bits) but at 6Mhz it seemed impossible that one could 
> run a loop of any consequence for greater than 2^32 or 2^64
> iterations. If you wanted to do that you'd have to do the
> looping using some other construct. In general it is safe to
> assume that the upper bound of the register size cannot be
> exceeded. There is a practical performance difference to
> be gained by using (declare (fixnum  as the compiler can,
> in the best case, assign a register to the loop variable.
> t

reply via email to

[Prev in Thread] Current Thread [Next in Thread]