[squeak-dev] [Performance] #printString and Array ... (Example:
LRUCache)
Bert Freudenberg
bert at freudenbergs.de
Mon Jan 19 10:22:08 UTC 2015
On 19.01.2015, at 11:07, Marcel Taeumel <marcel.taeumel at student.hpi.uni-potsdam.de> wrote:
>
> Hi, there!
>
> c := LRUCache someInstance.
> (c instVarNamed: #map) size. "47"
> [(c instVarNamed: #head) printString size] timeToRun. "1825"
>
> If this cache grows, #printString gets very slow.
>
> c := LRUCache allInstances first.
> (c instVarNamed: #map) size. "4952"
> [(c instVarNamed: #head) printString size] timeToRun. "Well..."
>
> Any ideas how to fix that?
>
> Best,
> Marcel
Nodes should get their own class, not be 4-element Arrays.
- Bert -
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4115 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150119/40fb74fb/smime.bin
More information about the Squeak-dev
mailing list
|