Quote Originally Posted by dilettante View Post
Incr will just run slow and be clumsy to read anyway.
For what it's worth, I concur with Dilettante. Constructs such as i = i + 1 are not inefficient and are very easy to read and understand. Wrapping them into a Function / Subroutine will reduce efficiency, especially if there ae lots of them.

I would concentrate on reducing the total number of instructions executed, rather than increasing them. This will probably mean re-structuring some of the code. Have you performed any analysis to determine specific areas of 'inefficiency'? ie are there any Subroutines / Functions that run for excessive lengths of time? I'd concentrate on those first, then pick off the 'minor ones' as and when.

My guess is that if the project has 'millions of lines of code' (which begs the question, why?) there are plenty of opportunities for improvements.