[plt-scheme] Integer-length

From: Philippe Meunier (meunier at ccs.neu.edu)
Date: Wed Mar 22 13:37:38 EST 2006

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.

Philippe




Posted on the users mailing list.