[Bug 2072478] [NEW] g++-14 performance regression - built with debug checks

Launchpad Bug Tracker 2072478 at bugs.launchpad.net
Mon Jul 8 09:26:34 UTC 2024


You have been subscribed to a public bug:

System information (Docker container for ubuntu:24.04):

```
$> lsb_release -rd
No LSB modules are available.
Description:    Ubuntu 24.04 LTS
Release:        24.04
```

Package information:

```
$> apt-cache policy g++-14 
g++-14:
  Installed: 14-20240412-0ubuntu1
  Candidate: 14-20240412-0ubuntu1
  Version table:
 *** 14-20240412-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages
        100 /var/lib/dpkg/status
```

g++-14 in Ubuntu 24.04 builds extremely slow. At Boost, we've noticed
increases of around x2 in CI build times.

This thread by some of my colleagues at Boost summarizes the problems
we've found:
https://www.reddit.com/r/cpp/comments/1cfzydb/gcc_14_twice_as_slow_as_gcc_13/

It looks like Ubuntu 24.04 g++-14 is indeed a debug build, and hence the
slowdown. Running in an `ubuntu:24.04` Docker container the following:


```
apt update
apt install -y --no-install-recommends g++-14
g++-14 -v
```

Yields the following:

```
g++-14 -v
Using built-in specs.
COLLECT_GCC=g++-14
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/14/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 14-20240412-0ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-14/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust --prefix=/usr --with-gcc-major-version-only --program-suffix=-14 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-14-OQFzmN/gcc-14-14-20240412/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-14-OQFzmN/gcc-14-14-20240412/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=yes,extra,rtl --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240412 (experimental) [master r14-9935-g67e1433a94f] (Ubuntu 14-20240412-0ubuntu1)
```

The problem is `--enable-checking=...` - as per the GCC configure
reference page (https://gcc.gnu.org/install/configure.html), it should
be set to `--enable-checking=release`.

Reading gcc's configure page, I think this happened because gcc was
built from the master branch (as the release branch wasn't out at the
time Ubuntu 24.04 was published).

Now that gcc 14 is officially out, it would be great if we could get an
updated package with gcc built in release mode.

Thanks,
Ruben.

** Affects: gcc-14 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
g++-14 performance regression - built with debug checks
https://bugs.launchpad.net/bugs/2072478
You received this bug notification because you are a member of Ubuntu Foundations Bugs, which is subscribed to gcc-14 in Ubuntu.



More information about the foundations-bugs mailing list