[gambit-list] Gambit-C vs. Bigloo vs. MzScheme

Marc Feeley feeley at iro.umontreal.ca
Mon Aug 28 08:24:57 EDT 2006


On 28-Aug-06, at 2:58 AM, Sven.Hartrumpf at FernUni-Hagen.de wrote:

> Sun, 27 Aug 2006 18:38:30 -0400, feeley wrote:
>
>> representation, Gambit-C uses 4 bytes per char and Bigloo 1 byte per
>> char; this could be improved by recompiling Gambit-C so that strings
>> use 1 or 2 bytes per char
>
> Is this documented anywhere? (I guess that this is the reason why
> my larger string/symbol-intensive programs will need so much more
> memory compared to any other Scheme implementation.)

There are a few build parameters that are defined in include/ 
gambit.h .  In particular:

/*
* Range and size of Scheme characters.
*
* ___MAX_CHR must be 0xff, 0xffff or 0x10ffff.  The value 0xff is
* appropriate when text is limited to the ISO-8859-1 subset of
* Unicode.  The value 0xffff is for when text is limited to the BMP
* (Basic Multilingual Plane) subset of Unicode.  The value 0x10ffff
* allows all Unicode characters in text.  Note that the number of
* bytes per character in a string depends on ___MAX_CHR as follows:
*
*   ___MAX_CHR = 0xff      =>  1 byte per character
*   ___MAX_CHR = 0xffff    =>  2 bytes per character
*   ___MAX_CHR = 0x10ffff  =>  4 bytes per character
*/

#ifndef ___MAX_CHR
#define ___MAX_CHR 0x10ffff
#endif

Perhaps I should turn this into a "configure" option.

Marc




More information about the Gambit-list mailing list