MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #31677 All Revisions ] Back to Issue ]
Summary 0031677: Configuration - Allow Optimization Level O3 When Compiling With G++
Revision 2020-07-21 12:44 by kgv
Description Four years ago I have proposed to suppress optimization level O3 when compiling with g++. At that time O2 has lead to significantly smaller binaries and comparable execution speed in my tests. My proposal has been implemented as solution of issue 0027417.

I regret having done so. The g++ compilers have advanced and now in my new tests, optimization level O3 leads to significantly faster binaries than O2.

Here is my sizes table (g++ 10.1 with link-time optimization enabled):
+-------------------+----------+----------+----------+----------+
|                   |    O2    |    O3    |  O2+PGO  |  O3+PGO  |
+-------------------+----------+----------+----------+----------+
| DLLs Size [bytes] | 59328000 | 61991424 | 53314048 | 54062080 |
+-------------------+----------+----------+----------+----------+

PGO means "profile-guided optimization".

Note that the sizes increase with O3, but the difference is rather small.

Please also check these execution time results stemming from a unit test that mostly performs projections and evaluations on curves and surfaces:
+------------------------+--------+--------+--------+--------+
|                        |   O2   |   O3   | O2+PGO | O3+PGO |
+------------------------+--------+--------+--------+--------+
| Execution Time [msecs] | 129816 | 126795 | 117289 | 106026 |
+------------------------+--------+--------+--------+--------+

The speed-up with O3 is enormous.

In the light of the changed compiler behaviour, I would like to propose to undo optimization level O3 suppression.
Revision 2020-07-21 12:25 by BenjaminBihler
Description Four years ago I have proposed to suppress optimization level O3 when compiling with g++. At that time O2 has lead to significantly smaller binaries and comparable execution speed in my tests. My proposal has been implemented as solution of issue 0027417.

I regret having done so. The g++ compilers have advanced and now in my new tests, optimization level O3 leads to significantly faster binaries than O2.

Here is my sizes table (g++ 10.1 with link-time optimization enabled):

+-------------------+----------+----------+----------+----------+
| | O2 | O3 | O2+PGO | O3+PGO |
+-------------------+----------+----------+----------+----------+
| DLLs Size [bytes] | 59328000 | 61991424 | 53314048 | 54062080 |
+-------------------+----------+----------+----------+----------+

PGO means "profile-guided optimization".

Note that the sizes increase with O3, but the difference is rather small.

Please also check these execution time results stemming from a unit test that mostly performs projections and evaluations on curves and surfaces:

+------------------------+--------+--------+--------+--------+
| | O2 | O3 | O2+PGO | O3+PGO |
+------------------------+--------+--------+--------+--------+
| Execution Time [msecs] | 129816 | 126795 | 117289 | 106026 |
+------------------------+--------+--------+--------+--------+

The speed-up with O3 is enormous.

In the light of the changed compiler behaviour, I would like to propose to undo optimization level O3 suppression.


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker