lucasart / Demolito

UCI Chess Engine
GNU General Public License v3.0
44 stars 10 forks source link

Drop in nps after Code cleanup (161157a...) #86

Closed erbsenzaehler closed 6 years ago

erbsenzaehler commented 6 years ago

Conditions: ArchLinux gcc-7.2.0 and gcc-5.4.0 Intel i7-4770k

I replaced $1 search 12 1 by $search 12 1 | tail -1 to ease testing, everything else was left as is.

With the commit https://github.com/lucasart/Demolito/commit/161157a1579d8c6c90862525036d472b58a6584d I noticed a considerable slowdown with gcc5+7. Clang is not affected.

Before the patch everything seems ok:

HEAD is now at 9fec362... Simplify connected (21826105) tobias@brutus ~/chess/engines/demolito (git)-[9fec362...] % ./make.sh ./demolito
kn/s: 2397 total = 21826105

./make.sh ./demolito 11.26s user 0.13s system 98% cpu 11.534 total

With Code cleanup in it there is a massive drop:

HEAD is now at 161157a... Code cleanup tobias@brutus ~/chess/engines/demolito (git)-[161157a...] % ./make.sh ./demolito
kn/s: 1851 total = 21826105

./make.sh ./demolito 13.97s user 0.15s system 99% cpu 14.258 total

lucasart commented 6 years ago

Thanks. I'll have a look tonight.

lucasart commented 6 years ago

Confirmed:

$ ./after search 12 1 > /dev/null
kn/s: 2239
total = 21826105
$ ./before search 12 1 > /dev/null
kn/s: 3096
total = 21826105

I will re-apply the offending patch bit by bit to see where it's coming from.

lucasart commented 6 years ago

Fixed. Well, it's really a GCC bug, actually. All I can do is work around the bug...