Callbacks from C into Squeak

David T. Lewis lewis at mail.msen.com
Thu Dec 21 14:15:33 UTC 2006


On Thu, Dec 21, 2006 at 11:33:31AM +0000, dan wrote:
> Ive just done a benchmark, and the time taken to do a VSE callbak is 
> 0.05ms, which is not much faster than the process 2 process solution you 
> suggested. Revising the figures using a non-debug DLL..
> 
> The total time spent in Smalltalk is 0.2ms, split into 1/3 performing 
> the callback, and 2/3 doing the calculation.
> 
> The total time spent in Fortran is 0.1ms.
> 
> We spend twice as much time in Smalltalk as we do in Fortran. Moving 
> everything into Fortran would at maximum tripple the runtime speed, 
> which is not a great return on investment.
> 
> Moving the ODE solver from Fortran into a high level language like 
> Matlab or Smalltalk would kill performance. So, the current solution 
> sounds like the right architecture.

Is your Smalltalk VSE code portable enough that you can get it running
in Squeak? If so, it would not be hard to run a test to see how fast
it actually goes. We could just hack it into one of the tests that
I sent you earlier and have one of the Squeak images play the role
of the Fortran program, sending some dummied-up data to the other
Squeak doing the "callback."

Dave




More information about the Squeak-dev mailing list