I am also doing similar (however I use Brice's batch file after various modifications - and do get additional 3% speed gain) at the moment ... a slight difference being I can afford to use -march=native ... so no need for other flags ... also I had initially thought 'cpuz' is being used for just determining basic architecture ... however the .txt file generated is quite similar to the output of gcc -c -Q -march=native --help=target ... so I suspected it's being used to get profile data (however could read it in the script itself) ... anyway thanks for your shell script ... will try it out and post feedback ...
I'll try using -march=native with 4.7.3, but with 4.8 it actually yielded slower code.
Including -march=native again yielded slower code. However, with 4.7.3, including -flto in the final compilation yielded a clear speed-up. Here's the modified script:
zullil wrote:Including -march=native again yielded slower code. However, with 4.7.3, including -flto in the final compilation yielded a clear speed-up. Here's the modified script:
-lpthread -flto gives me slow build again ... I have to use -march=native - else I get compilation error ... as I have reported, I have to incorporate your script into windows batch-file (by Brice in BYO) ... I am not able to run your scripts independently for two reasons
(1) I am on windows (8.1 pro 64) & (2) I am complete newbie so I don't know how to run your script ...
Can you please make a 'batch file' ... with instructions where to keep it & run? (my gcc is at C:\MinGW\mingw64)
zullil wrote:Including -march=native again yielded slower code. However, with 4.7.3, including -flto in the final compilation yielded a clear speed-up. Here's the modified script:
-lpthread -flto gives me slow build again ... I have to use -march=native - else I get compilation error ... as I have reported, I have to incorporate your script into windows batch-file (by Brice in BYO) ... I am not able to run your scripts independently for two reasons
(1) I am on windows (8.1 pro 64) & (2) I am complete newbie so I don't know how to run your script ...
Can you please make a 'batch file' ... with instructions where to keep it & run? (my gcc is at C:\MinGW\mingw64)
We're in two different worlds!
Don't think you want -lpthread if you're using mingw. Simply omit that.
Have no idea about Windows or batch files. Maybe someone who is "multilingual" can translate my script for you.