[plt-scheme] Integer-length

From: Robby Findler (robby at cs.uchicago.edu)
Date: Wed Mar 22 16:14:25 EST 2006

At Wed, 22 Mar 2006 22:10:14 +0100, Jens Axel Søgaard wrote:
> Philippe Meunier wrote:
> > Joe Marshall wrote:
> > 
> >>If you are only interested in numbers with a few bits, however, a
> >>nested conditional will most likely be the fastest.
> > 
> > 
> > For big numbers I'd go with Jacob's log-based solution.
> > For small numbers I'd just precompute the answers, keep them in a
> > vector, and use the input number as the vector's index.
> 
> I think I have too many small numbers :-)

Did you consider building a conditional of size log(10000) (presumably
building it with a macro)?

Robby


Posted on the users mailing list.