Split loop from OpenGL example, improved timing