2010/10/10 Michael Lucas-Smith <michael.lucassmith@gmail.com>:
I first attempted to replace #growToAtLeast: with #grownBy: because Squeak become: is notoriously inefficient. But obviously, this did not work, the tests rely on destination preserving its identity. This clearly is going to degrade micro benchmarks when the destination collection capacity is not well adjusted in advance. I think we should discuss this particular point. Is identity preservation absolutely required, or just convenient ?
Which tests? I'd be in favor of removing that assumption.
Michael
This is in: CollectionReadingWritingTest>>setUp | buffer | buffer := XTElasticBuffer on: ByteArray new. input := buffer reading. output := buffer writing. The expectation is that the buffer will be shared between input and output. If output modifies a copy of buffer, then the tests fail (input is empty or partial or too long if WriteStream>>#close did not perform a #become: ) Nicolas