Floating point performance

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Floating point performance

David Faught
This may sound like a Croquet question at first, but it's really a
Squeak question.  At least that's my impression :-)

I have been toying with the idea of redoing a physics simulation that
Orion Elenzil originally did in order to make a more general physics
engine for Croquet, with the idea that it would be coded it in Slang
so that it could eventually be compiled as a plugin for speed.

As a preliminary step, I profiled Orion's simulation using
MessageTally to get a general idea of where to concentrate my efforts.
 The results showed that almost 80% of the time was spent in basic
floating point array operations like addition and subtraction.  Which,
as far as I can tell, is already being done in a plugin!

Does this mean that this project is a waste of time, as far as
performance gain is concerned?  Or is there something still to be
gained, like maybe minimizing conversion between internal and external
representations?

Is there some way to tell if the actual floating point operations are
being done in hardware?  I would guess that they must be, but how can
I tell for sure?

Thanks for any guidance.

Reply | Threaded
Open this post in threaded view
|

Re: Floating point performance

johnmci
Could you share your messageTally. If you are using floatarray logic  
then most of the math is done in the plugin. However
the plugin does not take advantage of any vector processing hardware  
you might have so there is room for improvement.
Also if  you have say a+b*c-d  in smalltalk where these are float  
array objevcts that would three primitive  interactions, converting  
that to slang would provide some performance improvements.

On Dec 13, 2006, at 6:58 AM, David Faught wrote:

> This may sound like a Croquet question at first, but it's really a
> Squeak question.  At least that's my impression :-)
>
> I have been toying with the idea of redoing a physics simulation that
> Orion Elenzil originally did in order to make a more general physics
> engine for Croquet, with the idea that it would be coded it in Slang
> so that it could eventually be compiled as a plugin for speed.
>
> As a preliminary step, I profiled Orion's simulation using
> MessageTally to get a general idea of where to concentrate my efforts.
> The results showed that almost 80% of the time was spent in basic
> floating point array operations like addition and subtraction.  Which,
> as far as I can tell, is already being done in a plugin!
>
> Does this mean that this project is a waste of time, as far as
> performance gain is concerned?  Or is there something still to be
> gained, like maybe minimizing conversion between internal and external
> representations?
>
> Is there some way to tell if the actual floating point operations are
> being done in hardware?  I would guess that they must be, but how can
> I tell for sure?
>
> Thanks for any guidance.
>

--
========================================================================
===
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===