Re: Memory
- Posted by Rob Craig <rds at EMAIL.MSN.COM> Jan 10, 1999
- 983 views
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/