[plt-scheme] Partitioning Mzscheme Collections

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Jul 24 10:04:26 EDT 2003

At Wed, 23 Jul 2003 22:06:01 -0000, Alexander Shendi wrote:
> I'm currently trying to make a mzscheme package
> for my Sharp Zaurusi PDA. I would like to keep 
> the mzscheme binary and mandatory libraries
> on the in memory filesystem and (more or less)
> optional packages on a removable CF-card.

The MzScheme binary is self-contained, unless you build with
--enable-shared (formerlly --enable-dynlib), in which case the binary
depends only on the shared libraries.

All collections are optional for plain `mzscheme'.

> Also ist it possible to switch mzscheme into
> a "benchmark" mode for faster execution 
> (e.g. declare standard R5RS-procedures as
> immutable, inline procedures etc.)

`(require mzscheme)' can make a small difference on toy loops, because
it makes `add1' refer directly to MzScheme's `add1', etc.:

 > (time (let loop ([n 400000]) (unless (zero? n) (loop (sub1 n)))))
 cpu time: 140 real time: 140 gc time: 0
 > (require mzscheme)
 > (time (let loop ([n 400000]) (unless (zero? n) (loop (sub1 n)))))
 cpu time: 130 real time: 130 gc time: 0

The difference is not likely to matter in practice, and there's no
difference if you put code in `module'.

The difference with mzc can be more significant, but I don't think
that's your question. (More details are in the mzc manual if it sounds
relevant.)

Matthew



Posted on the users mailing list.