The fact that you can reproduce it doesn't mean it's representative.
Sure, it's faster. Noticably faster - I'm not sure. Biased to prove the point - definitely soCan't I conclude then, that for these particular pieces of code, the second one is noticably faster than the first one, though they both yield the same result?
It is true that post-increment is in most cases slower than pre-increment, but the for() loop has nothing to do with it, so let's not exagerrate it - we mostly iterate fors using integers.
Using clock(), times() or "time" shell command. Or a profiler.how do I measure the process time btw?
Bookmarks