03-06-2013 04:35 PM
Ahhhh...OK, so now I see where you are getting your factor of 2. Very interesting. Another interesting thing is that if you add in the DBL conversion, this jumps to a factor of 10. Thanks a lot for looking at this guys.
Matt
03-06-2013 04:47 PM
I should also go ahead and point out that there are a couple more things that can be done: the conversion of the I32s, the division of the iTime by mTime and the subsequent conversion to a long Int can be removed from the top most loop to the outside of both loops. The End.
03-06-2013 04:52 PM
@mtat76 wrote:
I should also go ahead and point out that there are a couple more things that can be done: the conversion of the I32s, the division of the iTime by mTime and the subsequent conversion to a long Int can be removed from the top most loop to the outside of both loops. The End.
The compiler might already do that behind the scenes (loop invariant code motion). One of the divisions is now on an array, so you might not gain that much...
03-06-2013 04:53 PM
Thanks, Altenbach. I figure that but, might as well do what I can...
03-06-2013 04:56 PM
Personally, I never trust the compiler and would move it outside. 😄
03-06-2013 04:57 PM
I hear that!