Callbacks from C into Squeak
dan
mr.d.poon at gmail.com
Thu Dec 21 10:29:48 UTC 2006
David T. Lewis wrote:
> - With 4000 byte uninterpreted data messages, overall transaction
> time is under 0.5 msec per end-to-end transaction..
Hi David
Im running on a pentium 4 @ 3GHz. Naively, given that your computer runs
at 0.166GHz, dividing 3GHz/ 0.166GHz means that my computer is 17X
faster, so your 0.5ms end-to-end transaction would take 0.03ms on my
computer.
I ran some benchmarks on our existing code in VSE running on a real
simulation situation. Executing the actual maths calculation in the
Smalltalk callback took 0.16 ms.
Total solve time divided by the number of callback gives 0.36 ms per
callback. Time included in the 0.36 ms covers time spend integrating the
ODE in Fortran, the mechanics of the callback, and actually doing the
maths in the callback.
So the overhead of 0.03ms to perform the callback mechanism is indeed
acceptable.
Interestingly, only half the total time is spent in the Smalltalk maths
calculation. I would like to work out how the time is split in our
existing code further, i.e. how much time is spend in the VSE callback
mechanism, and how much time is spent in Fortran doing the ODE
integration. That would tell me whether the main overhead is doing an
ODE integration, or whether providing sample points via a Smalltalk
callback is the main speed issue. Im not sure how to do that though...
Cheers
Daniel
More information about the Squeak-dev
mailing list
|