Unique all characters?
ncellier at ifrance.com
Mon Jan 28 21:11:06 UTC 2008
Making Character immediate like SmallInteger instead of OOP would
probably make a difference.
Both unique and fast. For the price of added complexity in the VM.
But Eliot must know this for sure.
Bert Freudenberg a écrit :
> On Jan 28, 2008, at 21:51 , Andreas Raab wrote:
>> Philippe Marschall wrote:
>>>> (Alternatives that are indexed by integers might also work well,
>>>> e.g. a flat
>>>> WeakValueDictionary that used a WeakArray for its values).
>>> Lord no, please no more Weak* collections. That was one of the major
>>> performance fixes we did in Seaside, kicking Weak* collections. They
>>> don't scale, they kill you in production.
>> It's finalization that kills you, not weak collections per se. If it
>> were then symbol management should cause the same issues. For the case
>> in question you could shrink the character table on system startup /
>> shutdown which would avoid the finalization issues.
> Well, instances of characters are mostly temporary - Strings actually
> store binary numbers, not Character instances, they create Characters on
> the fly.
> One would have to measure the space and performance trade-offs of
> looking up unique Character instances vs. simply creating characters
> when needed. My hunch is it doesn't matter so is not worth the added
> - Bert -
More information about the Squeak-dev