Updates:
Status: FixProposed
Comment #2 on issue 4077 by
[hidden email]: Dictionary at:ifPresent:
performance issues on Cog VM
http://code.google.com/p/pharo/issues/detail?id=4077Cog is faster than Squeak for this method, so I don't think it's a cog
problem...
To me, it's the cost of creating a Block which get emphasized a bit more in
cog.
But we can avoid it if we really want to optimize this method, see
Name: SLICE-Issue-4077-FastUp-at-ifPresent-nice.1
Dependencies: Kernel-nice.878, Collections-Unordered-nice.112
With this change I have:
| d b |
d := Dictionary new.
b := [].
[d at: 1 ifPresent: b] bench
'10,500,000 per second.'
| d b |
d := Dictionary new.
b := [].
[d at: 1 ifAbsent: b] bench
'9,370,000 per second.'
_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker