Re: Memory

new topic     » goto parent     » topic index » view thread      » older message » newer message

Rob... What about creating a "PACKED SEQUENCE" option in Euphoria similar to
the "PACKED ARRAY" or "PACKED RECORD" used in old Pascal compilers? This
would create complexities (processing delays) but only at the request of the
coder. You might also need an UNPACK() function depending on how you
implement it.



-----Original Message-----
From: Rob Craig <rds at EMAIL.MSN.COM>
To: EUPHORIA at LISTSERV.MUOHIO.EDU <EUPHORIA at LISTSERV.MUOHIO.EDU>
Date: Sunday, January 10, 1999 11:09 AM
Subject: Re: Memory


>Tor Bernhard Gausen writes:
>
>> Does this mean that if I fill up a sequence with say 1.000 atoms
>> containing only zeros and ones (each atom holding the value 0 OR
>> the value 1), then the sequence will take up only about 125 bytes ?
>> I mean, THAT would be (or perhaps it _IS_) great!
>
>It would be possible for an implementor of Euphoria to do that,
>but the current implementation of Euphoria will use 4 bytes per
>element for an array of 1's and 0's. More sizes could be supported
>but there would be drawbacks. It would make the
>interpreter bigger, more complicated, and in some cases
>slower. I wouldn't rule out having a 1 byte per element format
>for sequences of small integers, but so far I haven't been
>able to convince myself that it's worth the trouble.
>
>Changes like this can be made to the implementation of Euphoria
>without breaking any code. If Microsoft decided in the next release
>of their C++ compiler that the "int" type would now use 2 bytes,
>or 8 bytes, or whatever, they would cause *massive*
>breakage.
>
>Regards,
>     Rob Craig
>     Rapid Deployment Software
>     http://members.aol.com/FilesEu/

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu