1 2 3 Previous Next 65 Replies Latest reply on Jul 11, 2009 8:56 PM by YoungWinston

    Please review my loop and rewrite it for better performance

      I'm very new to JAVA and programming in general and know nothing about speed optimizing. I've written this loop, but is there a better way to archive (even theoratically) better performance? If there is please explain why another way is faster. My loop goes her:

      for (int x = 0; x < this.getWidth(); x++) {
           for (int y = 0; y < this.getHeight(); y++) {
      //Something goes here

      First post here, excuse me if I've posted it in the wrong category.

      Thanks in advance.
        1 2 3 Previous Next