[Pharo-project] Counting Messages as a Proxy for Average Execution Time in Pharo
alexandre.bergel at me.com
Thu Apr 28 15:37:17 CEST 2011
There has been many discussion on profiling and execution. I believe the paper titled "Counting Messages as a Proxy for Average Execution Time in Pharo" draws some bases for a new generation of code profilers that are not tied to execution sampling. Advantages are numerous without not that many drawbacks.
I will put some effort on having "Compteur" in the main Pharo vm. This has to be carefully done and monitored to make sure there is no unwanted overhead. In the experience I have done, there is no overhead. I have started to get in touch with people close to the VM. I will keep you informed, especially when reviews and testing will be needed.
One very cool think that everybody can benefit from, is to be able to write assertion in unit tests like:
self assertIs: [ "expression1" ] fasterThan: [ "expression2" ]
It compares the amount of messages sent by expression1 with the amount of messages sent by expression2, no matter how many messages are sent. Counting messages is, in the average, closely link to the average execution time.
This cannot be done with [ ... ] timeToRun or MessageTally.
I will keep you informed.
Alexandre Bergel http://www.bergel.eu
More information about the Pharo-project