[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] Helpful compiler options [Was: Micro-optimization in ledger_format
From: |
Greg Chicares |
Subject: |
[lmi] Helpful compiler options [Was: Micro-optimization in ledger_format] |
Date: |
Fri, 18 Jan 2019 23:44:49 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 |
On 2019-01-17 02:33, Vadim Zeitlin wrote:
[...]
> BTW, in principle, PGO should help with making your original (i.e.
> current) code as fast as my version as it would discover that the "global"
> variable inside imbued() is not really shared. It might be interesting to
> try building lmi with PGO, it's known to result in quite significant
> optimizations in many cases.
https://www.phoronix.com/scan.php?page=article&item=gcc-82-pgo&num=3
|
| The Crafty chess benchmark benefited by a very small amount with PGO.
|
| The Stockfish chess benchmark performance advantage was slightly more
noticeable than Crafty.
|
| The TSCP chess engine saw about a 9% performance boost thanks to GCC's PGO.
A possible improvement on the order of ten percent would be well worth
investigating.
Similarly, a few months ago I tried using gcc's "sanitizers", but IIRC
they don't work with 32-bit msw binaries. (That's yet another reason
why I need to work on multiarch builds.)
We're already using quite a few gcc-7 warning options. Some of them are
turned off for certain files, either for good reasons:
bourn_cast_test.o: gcc_common_extra_warnings += \
-Wno-double-promotion \
...or just because we haven't gotten around to addressing them:
currency_test.o: gcc_common_extra_warnings += \
-Wno-useless-cast \
And 'workhorse.make' lists some extra options that we can consider
enabling (making any useful code changes they may suggest) in 2019:
# Consider these later.
#
# -Wdate-time: only for "bit-wise-identical reproducible compilations"
postponed_gcc_common_warnings := \
-Wdate-time \
-Wmissing-declarations \
-Wnull-dereference \
-Wswitch-enum \
-Wunsafe-loop-optimizations \
# Consider these later.
#
# -Wsuggest*: use these only occasionally, like -Weffc++
postponed_gcc_cxx_warnings := \
-Wnon-virtual-dtor \
-Wsign-promo \
-Wsuggest-final-methods \
-Wsuggest-final-types \
- Re: [lmi] Micro-optimization in ledger_format, Greg Chicares, 2019/01/16
- Re: [lmi] Micro-optimization in ledger_format, Vadim Zeitlin, 2019/01/16
- Re: [lmi] Micro-optimization in ledger_format, Greg Chicares, 2019/01/16
- Re: [lmi] Micro-optimization in ledger_format, Vadim Zeitlin, 2019/01/16
- Re: [lmi] Micro-optimization in ledger_format, Greg Chicares, 2019/01/16
- Re: [lmi] Micro-optimization in ledger_format, Vadim Zeitlin, 2019/01/16
- [lmi] Local variable of rvalue reference type [Was: Micro-optimization in ledger_format], Greg Chicares, 2019/01/17
- Re: [lmi] Local variable of rvalue reference type, Vadim Zeitlin, 2019/01/17
- Re: [lmi] Micro-optimization in ledger_format, Greg Chicares, 2019/01/17
- [lmi] Helpful compiler options [Was: Micro-optimization in ledger_format],
Greg Chicares <=
- Re: [lmi] Micro-optimization in ledger_format, Greg Chicares, 2019/01/18
Re: [lmi] Micro-optimization in ledger_format, Greg Chicares, 2019/01/18