On Tue, 1 Apr 2025 11:59:07 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:

> It would be interesting to also see how compilation times varies with 
> optimization level. At least some kind of hint if HIGHEST is like 2x slower 
> than LOW, or if SIZE is slower than LOW at all, etc. The relative speed 
> difference is interesting, but so is it in absolute terms. If a library takes 
> 0.5 seconds on LOW but 1.1 seconds on HIGH on a particular system, it is 
> unlikely to matter much to overall build time anywhere. But if it goes from 
> 15s to 30s on a fast machine, it might be a problem if such performance 
> regressions stack up, especially on slower machines (which includes the ones 
> running GHA).

This is what I got from my Linux x86_64 system using gcc 13.2.0 devkit (opt 
build). Note that the build operates on a relatively slow filer, this will slow 
the build time somewhat  but that is true for all  opt-levels.


rm -rf  ./support/modules_libs/jdk.jdwp.agent/libjdwp.so  ./jdk/lib/libjdwp.so  
 ./support/native/jdk.jdwp.agent/libjdwp
time make jdk.jdwp.agent-libs-only  JOBS=1



gave me these times 

**default (LOW)**
real    0m15.661s
user    0m8.763s
sys     0m2.012s

**HIGHEST**
real    0m15.201s
user    0m9.005s
sys         0m2.003s

**SIZE**
real    0m14.263s
user    0m7.905s
sys     0m1.891s

So it looks like SIZE is a little faster than the other, and LOW  and  HIGHEST 
are rather similar.
LOW is `-O2` on Linuxx86_64 and HIGHEST is `-O3` , those are maybe rather 
similar  (LOW is a bit misleading because `-O2` is not really that 'low' the 
gcc docu says about it  : 'Optimize even more. GCC performs nearly all 
supported optimizations that do not involve a space-speed tradeoff.').

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23563#issuecomment-2786694168

Reply via email to