discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective-C and Smalltalk; speed of message send


From: Marcel Weiher
Subject: Re: Objective-C and Smalltalk; speed of message send
Date: Tue, 10 Aug 2004 09:32:29 +0100


On 8 Aug 2004, at 05:08, Lyndon Tremblay wrote:

"5 timesRepeat: [ Transcript show: 0 tinyBenchmarks; cr ]"

Both compiled at -O3,
C Function - 1938968 calls/sec
Objective-C Message - 824973 sends/sec

This is under a system with stable load, tested multiple times. I've had the Squeak test at "144m bytecodes/sec; 7.7m sends/sec", so perhaps an active image had an effect here. Um, tell me what I have missed, or what is really
going on. I am surprised enough to not believe it is a fair test.

Apart from what Richard said, it seems you are primarily measuring the speed of the getrusage() system call that clock() tends to be based on...

Actual message passing speed for a constant receiver is around 50 ns on 1 Ghz G4, with a third of that going to inter-module calling overhead. So around 20 million message sends per second. Squeak on the same system is significantly slower.

Marcel


--
Marcel Weiher                           Metaobject Software Technologies
address@hidden          www.metaobject.com
Metaprogramming for the Graphic Arts.   HOM, IDEAs, MetaAd etc.
                1d480c25f397c4786386135f8e8938e4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]