[ODE] Patch to optimize contactGetInfo2 submitted on SF
Jason Perkins
starkos at gmail.com
Wed Jul 12 12:14:57 MST 2006
On 7/11/06, Remi Ricard <remi.ricard at simlog.com> wrote:
> This patch do some simple optimization of the function
> contactGetInfo2.
>
> - Unroll for loops and delete the indexing variable
> - Remove unneeded initialization
> - Do a check only when needed. ( move the "if (j->the_m >= 3)" inside
> the "if (j->the_m >= 2)"
I unrolled the loops, but I did not make the other changes as I felt
they reduced readability for no real performance gain. If someone can
demonstrate a measurable performance gain by removing the one
conditional then I'll move it.
Thanks for the patch!
Jason
More information about the ODE
mailing list