[plt-scheme] Effect of caching using hash-tables vs vectors

From: Eli Barzilay (eli at barzilay.org)
Date: Sat Mar 17 16:34:57 EDT 2007

On Mar 17, Daniel Yoo wrote:
> Just for fun, I did a solution for the 3n+1 problem from Programming 
> Challenges:
> 
>      http://acm.uva.es/p/v1/100.html
> [...]

Unrelated to your post -- but I played with this a while ago.  I
eventually realized that there are certain bit patterns that need to
be checked in a specific way, and ended up writing Scheme code that
would generate C code for each of these tests, then run it.  I managed
to prove that the thing converges up to something in the neighborhood
of numbers that are known to converge.  (I think it was something
around 1e20.)  I can send you the file if you're interested -- but it
will take some time to decipher what it's doing.
-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.