Its not a university thing. I was just curious what compiler optimizations I could integrate into the code myself. I haven't slept well in days, I've been taking shortcuts to keep from thinking too hard :P
Why aren't you able to get it to go any faster in the target system, then? Typically the difference in performance from one compiler's optimizations to another's is a few percentage points, not tens of times.
Target compiler? Version? Compiler options?
Microsoft's standard library has egregious performance in debug mode partly because its iterator types are heavily instrumented. To fix it, define _ITERATOR_DEBUG_LEVEL to 0.
that could be cache (the program runs faster because the OS has decided you will run it repeatedly and is playing games with the paging and management) or luck (you caught a run or two where your program was not time sliced with other programs, nothing else was running, etc).
try setting your program to highest priority class that you can, it will give more consistent results.
There is no good way to cold-start that I know of .. to prevent the OS stuff so it behaves as if you just ran it once out of the blue. You almost need to reboot between runs to get that.