I’d +1 on this - in my past experience I’ve mostly seen -O2. It would make sense to default to -O2 and only enable -O3 on source files selectively that can be demonstrated to benefit from it (if anyone actually spends the time to look into it).
Sasha > On Jul 20, 2022, at 2:10 PM, Wes McKinney <wesmck...@gmail.com> wrote: > > hi all, > > Antoine and I were digging into a weird issue where gcc in -O3 > generated ~40KB of optimized code for a function which was less than > 2KB in -O2, and where a "leaner" implementation (in PR 13654) was yet > faster and smaller. You can see some of the discussion at > > https://github.com/apache/arrow/pull/13654 > > -O3 is known to have some other issues in additional to occasional > runaway code size -- I opened > > https://github.com/apache/arrow/pull/13661 > > to explore changing out release optimization level to -O2 and see what > are the performance implications in our benchmarks (and likely make > builds meaningfully faster). If anyone has any thoughts about this let > us know! > > Thanks, > WES