string sharing (possible bug?)
C. Keith Ray
ckray at pixera.com
Thu Dec 10 02:23:29 UTC 1998
on 12/09/1998 01:07 PM, glenn krasner at objectshare.com wrote:
>>The simplest method is to just create a new object every time a
>>literal is encountered.
>And, for example in the case of our window builder, suffer a large
>performance penalty every time you open a window. And that penalty would be
>paid by everyone just so that the few people who accidentally store into a
>literal array or string would have a better time of it. That's not the
>tradeoff we decided to make, and I suspect that this would also be a worse
>choice for Squeak.
>If this upsets your sensibilities ("Yuck" is a clue), I think you're more
>likely to find a better path by making immutability cheap in Squeak, than
>by removing compile-time literal construction.
Is this the window builder in Squeak? Has this penalty been measured?
C. Keith Ray ckray at pixera.com
Sr. Software Engineer 408-341-1800 x 242
Pixera Corp. http://www.pixera.com
More information about the Squeak-dev