RFR: JDK-8246751 Mac OS build settings should use -O3
David Holmes
david.holmes at oracle.com
Tue Jun 9 06:59:20 UTC 2020
On 9/06/2020 8:26 am, Claes Redestad wrote:
> On 2020-06-09 00:12, Sergey Bylokhov wrote:
>> On 6/8/20 3:06 pm, Claes Redestad wrote:
>>> Right, -O3 is now likely the default for most files.
>>>
>>> I'm not sure you suggest the reported ~2% difference between -Os and
>>> -O2/-O3 as an argument against changing to -O3 by default. It might be
>>> statistically significant - or just noise - but we should at any rate
>>> be wary of overfitting to a particular (micro-)benchmark.
>>
>> I guess that should be the opposite way round. Some good numbers other
>> than
>> noise should be used as an argument of changing -0s to -03 by default.
>
> I think if the differences are all in the noise then that could just as
> well be used as an argument for _harmonizing_ the build optimization
> strategy with the other platforms. While not easy to quantify,
> harmonizing theoretically reduces risk of obscure platform specific
> issues, since, while different, different platforms will use similar
> optimizations schemes at -O3.
On the third hand "if ain't broke ..."
Seems to me that any change to build flags should be backed up by
a-priori evidence that it is a worthwhile change.
David
-----
>>
>>>
>>> It'd also be good to re-run with the new default: when most compilation
>>> units change to -O3, which optimization level is ideal for an individual
>>> compilation unit (such as unsafe.cpp) might very well change, since
>>> what optimizations are available through the build chain can shift
>>> considerably.
>>
>> Hope we will get some good improvements, otherwise it is better to use
>> -0s.
>>
>
> I hope so too!
>
> /Claes
More information about the build-dev
mailing list