I have a piece of code that runs 2x faster on windows than on linux. Here are the times I measured:
g++ -Ofast -march=native -m64 29.1123 g++ -Ofast -mar
Extracted answer from the edited question:
It was caused by building 32b binaries on windows as opposed to 64b binaries on linux, here are 64b numbers for windows:
Visual studio 2013 Debug 64b 29.1985 Visual studio 2013 Release 64b 29.7469