Switch from -O2 to -O3 as optimization default?

23 views
Skip to first unread message

Jeffrey Walton

unread,
Jul 24, 2017, 10:02:51 AM7/24/17
to Crypto++ Users
Hi Everyone,

The makefile uses -O2 as the default optimization level.

The source code can support -O3 as the optimization level. In fact, we support -O5, -Os and -Ofast. We regularly test them in cryptest.sh (https://github.com/weidai11/cryptopp/blob/master/cryptest.sh).

At -O3, GCC and other compilers will vectorize, meaning they will use SIMD units, like SSE and NEON. When the compiler takes an opportunity it is often a non-trivial speedup.

My question is, should we switch to -O3 as the default? Or maybe, is anyone opposed to doing so?

Jeff

Jeffrey Walton

unread,
Aug 4, 2017, 6:35:39 PM8/4/17
to Crypto++ Users
Reply all
Reply to author
Forward
0 new messages