Chess2u
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Chess2uLog in

descriptionCompiler Options EmptyCompiler Options

more_horiz
Hi everybody,

I'm trying to compile some src with Mingw64.

But the compile is about 10-15% slower than the ones I found here.

What can I change ?

Here is the options I use (not always all in the same time):

-Wcast-qual
-fno-exceptions
-fno-rtti
-Wextra
-Wshadow
-DNDEBUG
-DIS_64BIT
-DUSE_BSFQ
-DUSE_POPCNT
-flto
-pipe
-Wall
-mtune=amdfam10
-march=amdfam10
-w
-Ofast
-m64
-s

and

-DNO_PREFETCH
or
-msse


Which ones have I to stop using ?

Which ones have I to add ?

Thanks a lot

descriptionCompiler Options EmptyRe: Compiler Options

more_horiz
Software optimization resources
http://www.agner.org/optimize/

I hope this helps you and answers your questions.

descriptionCompiler Options EmptyRe: Compiler Options

more_horiz
Thanks Andres

I 'll take a look and try this tomorrow ;-)

descriptionCompiler Options EmptyRe: Compiler Options

more_horiz
Here is the flags I finally use :

-ffunction-sections
-fomit-frame-pointer
-fno-exceptions
-fno-rtti
-flto
-w
-Ofast
-m64
-s

With these my compile seems to have nearly the same speed as JA one (+/- 1%) on my computers.

I have again to test some other flags ...

descriptionCompiler Options EmptyRe: Compiler Options

more_horiz
Good! Can we expect a new compile soon? wink

descriptionCompiler Options EmptyRe: Compiler Options

more_horiz
We need to wait a little ... ;-)

I try to make some changes on toga 1.4 beta 5c

In fact it was difficult for me to compare my compile with original one if it was so slow... ;-)

Now I have a good speed I can really test correctly the settings and code optimization ...

I'm trying to make a clean and easily readable code first ... [it will be useful for programming beginners (like me) I hope]
(It's very long ... lol)

In the future, my goal is to make my own engine (from A to Z) ... Maybe a dream ... ;-)

descriptionCompiler Options EmptyRe: Compiler Options

more_horiz
are you compiling in Windows or other. I am trying to compile Stockfish in Windows 7 through code blocks with the same compiler as you but have similar problems.

descriptionCompiler Options EmptyRe: Compiler Options

more_horiz
Permissions in this forum:
You cannot reply to topics in this forum