[plt-scheme] PLT with very large datasets?

From: Eli Barzilay (eli at barzilay.org)
Date: Mon Jun 30 03:02:45 EDT 2008

On Jun 29, Mark Engelberg wrote:
> [...] If I remember correctly, customer/rating pairs can be stored
> in a single int by storing the customer number in the first 29 bits,
> and the rating in the last 3 bits.

Note that mzscheme uses one bit to tag a value as an integer, and
together with another bit for the sign it means that you can only use
numbers from 0 to 2^30-1 (use (fixnum? (expt 2 30)) to test this), or
use negative numbers to gain another bit.  If you get to bigger
numbers you'll create bignums and the cost goes up.  (This is one
reason that I suggested heterogeneous vectors or byte strings -- you
only pay for the numbers you're currently holding.)

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!

Posted on the users mailing list.