Thread: Combat Fixes
View Single Post
  #14  
Old 09-18-2008, 07:46 PM
bleh9
Fire Beetle
 
Join Date: Jul 2007
Posts: 3
Default

Quote:
Originally Posted by James76 View Post
I replaced any "x++" with "++x" for example, because its actually faster and you only need the post-increment on something like "myarray[x++]" which increments x after reading from the array, or "myarray[++x]" which increments x before reading from the array. Its faster because the post-increment has to push the value to return on the stack before incrementing.
Maybe I'm missing something, but myarray[x++] isn't the same as myarray[++x]. Also, ++x and x++ often optimized the same.

Last edited by bleh9; 09-19-2008 at 03:47 AM.. Reason: clarification
Reply With Quote