Frozen sequences
- Posted by Tor Bernhard Gausen <tor.gausen at C2I.NET> Jan 29, 1999
- 555 views
<FontFamily><param>Courier New</param>I just got this idea, and I want to here some opinions about it. <FontFamily><param>Times New Roman</param>I understand that one problem with sequences is that they support dynamical memory allocation even when this is not required or even wanted, since it slows down things. What about creating a 'freeze' feature which turns ordinary sequences into variable structures with a fixed size and shape? Eight bytes could be reserved for all atoms in the sequence, to avoid the need for reallocation of memory if for instance an integer turns into floating point. Note that only the structure of the sequnce is frozen, not the values of its atoms, which can be changed as usual. Any attempt to append, prepend or redifine the frozen sequence in any way would result in an error and the program would be terminated. Of course, the sequence could also be unfrozen when dynamic shrinking and growing is required again. Would this speed things up, and if so; how much? Best regards, Tor Bernhard Gausen. <nofill>