[Pharo-project] Counting Messages as a Proxy for Average Execution Time in Pharo

Stefan Marr pharo at stefan-marr.de
Thu Apr 28 15:21:38 CEST 2011


Hi:

On 28 Apr 2011, at 14:57, Michael Haupt wrote:

> On 28 April 2011 15:37, Alexandre Bergel <alexandre.bergel at me.com> wrote:
>> Counting messages is, in the average, closely link to the average execution time.
In the setting of the paper, that might be correct.
Even for the stated goal of optimizing for performance, it might still be interesting.
However, the optimizations done based on this criteria are bound to one specific VM implementation.

> I believe this is correct only as long as a purely interpreting VM is
> used, even though quick messages add a tiny bit of uncertainty. But
> add a JIT compiler and some inlining, and timeToRun and MessageTally
> are suddenly interesting again.
Or have a VM that is not Squeak, and perhaps use a language that is not used in the style Smalltalk is (7 lines of code per method, right?).

Have only skimmed the paper, Alexandre, so excuse the perhaps stupid question: Why don't you just count the number of executed bytecodes? The correlation between bytecodes and execution time should be even more close than messages to exec time. 



Bye the way, the remark on the mismatch between OO programming and profiling: profiling is about the execution model, and the execution model of Smalltalk is based on a stack machine. To me the execution model seems to be orthogonal to the structuring of the code. I don't see how you can really abstract from that, without coming up with a 'object-oriented' execution model (what ever that would be). Perhaps, the closest to that would be an actor-based execution model, like Erlang's language semantics. No stacks just message buffers.


Best regards
Stefan



-- 
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax:   +32 2 629 3525




More information about the Pharo-project mailing list