Issue 4077 in pharo: Dictionary at:ifPresent: performance issues on Cog VM

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 4077 in pharo: Dictionary at:ifPresent: performance issues on Cog VM

pharo
Status: New
Owner: ----

New issue 4077 by [hidden email]: Dictionary at:ifPresent:  
performance issues on Cog VM
http://code.google.com/p/pharo/issues/detail?id=4077

Pharo image: Pharo1.3
Pharo core version: Pharo1.3a 13170
Virtual machine used: Cog 2378 Linux

Steps to reproduce:
1. Time millisecondsToRun: [1000000 timesRepeat: [Dictionary new at: 1  
ifPresent: []]] a lot slower than its ifAbsent: counterpart. Works fine on  
Squeak VM



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4077 in pharo: Dictionary at:ifPresent: performance issues on Cog VM

pharo

Comment #1 on issue 4077 by [hidden email]: Dictionary at:ifPresent:  
performance issues on Cog VM
http://code.google.com/p/pharo/issues/detail?id=4077

can you report that on the cog bug tracker?

    http://code.google.com/p/cog/issues/list


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4077 in pharo: Dictionary at:ifPresent: performance issues on Cog VM

pharo
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=4077

Cog 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
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4077 in pharo: Dictionary at:ifPresent: performance issues on Cog VM

pharo
Updates:
        Status: Closed
        Labels: Milestone-1.3

Comment #3 on issue 4077 by [hidden email]: Dictionary at:ifPresent:  
performance issues on Cog VM
http://code.google.com/p/pharo/issues/detail?id=4077

in 13181


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4077 in pharo: Dictionary at:ifPresent: performance issues on Cog VM

pharo
Updates:
        Labels: MigratedToFogBugz

Comment #4 on issue 4077 by [hidden email]: Dictionary at:ifPresent:  
performance issues on Cog VM
http://code.google.com/p/pharo/issues/detail?id=4077#c4

Issue migrated to https://pharo.fogbugz.com/f/cases/4123

--
You received this message because this project is configured to send all  
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker