Hello everyone!
We just noticed that the same C++-Program performs way better when ran using gcc and Linux, than it does in Windows, using VisualStudio 2015.
The test program is calculates some integrals over and over again and was used in one of my programming assignments, where I work under Linux using my Laptop, which doesn't have a very fast CPU built in. The program finishes in about 0.9 second on it, while it takes a whooping 8-9 seconds on my much stronger Windows-machine!
Another problem is, that our game-project runs much faster on my friends linux machine than it does on mine. He is still going at ~140fps while some heavy physics scenes, while I'm down to ~20.
I'm very confused about that and I can't seem to find any more compile-flags which would improve the situation.
The flags I used on Windows are (These come directly from a compiler-benchmark since I was desperate):
/arch:SSE2 /Ox /Ob2 /Oi /Ot /Oy /fp:fast /GF /FD /MT /GS- /openmp
While the gcc-build uses:
-O3 -ffast-math -fopenmp -funroll-loops -march=native
The same phenomenon could be observed on an other friends windows-machine which has an even better CPU then mine.
It's really weird that my tiny laptop can outperform these computers in no-time. I mean, I should get the same code roughly up to the same speed on both operating systems, right?
Are there any more magic compilerflags to set or other pitfalls I should look out for?
Thanks in advance!