Hi,
Until now I always compiled e.g. Dog using mingw to target windows.
I just noticed it produces a binary that is 13x slower than the linux program on the same laptop.
How do you people cross-compile while maintaining the original speed of your program?
compiling for windows
Moderator: Ras
-
- Posts: 539
- Joined: Tue Jul 03, 2018 10:19 am
- Full name: Folkert van Heusden
-
- Posts: 2671
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: compiling for windows
That doesn't sound normal.
Under Linux, with the gcc-mingw-w64 package collection available in the normal distro repo. Just checked the native Linux compile vs. the Windows executable under Wine, and native is just 2% faster.How do you people cross-compile while maintaining the original speed of your program?
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net
-
- Posts: 2626
- Joined: Fri Nov 26, 2010 2:00 pm
- Location: Czech Republic
- Full name: Martin Sedlak
Re: compiling for windows
factor 13 almost sounds like it's been built with optimizations disabled
-
- Posts: 2626
- Joined: Fri Nov 26, 2010 2:00 pm
- Location: Czech Republic
- Full name: Martin Sedlak
Re: compiling for windows
and turns out I was right: 2.6 definitely is a debug build with optimizations disabled - looking at the disassembly in IDA:
nothing is inlined, every local spilled on stack, asserts compiled in and all over the place
ergo obviously not mingw's fault
nothing is inlined, every local spilled on stack, asserts compiled in and all over the place
ergo obviously not mingw's fault
-
- Posts: 539
- Joined: Tue Jul 03, 2018 10:19 am
- Full name: Folkert van Heusden
Re: compiling for windows
Ah!
Sounds plausible indeed.