On Sat, Dec 6, 2025 at 6:25 PM Konstantin Belousov <[email protected]> wrote:
>
> On Sat, Dec 06, 2025 at 11:50:08AM +0100, Mateusz Guzik wrote:
> > II. compilation speed
> >
> > The the real and serious problem. Both versions of the system ship the
> > same clang version:
> > FreeBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git
> > llvmorg-19.1.7-0-gcd708029e0b2)
> > Target: x86_64-unknown-freebsd14.3
> > Thread model: posix
> > InstalledDir: /usr/bin
> >
> > FreeBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git
> > llvmorg-19.1.7-0-gcd708029e0b2)
> > Target: x86_64-unknown-freebsd15.0
> > Thread model: posix
> > InstalledDir: /usr/bin
> >
> > I found that compiling the will-it-scale suite about doubles in real
> > time needed, along with doubling time spent in userspace.
> >
> > will-it-scale needs a little bit of massaging to work, diff at the end.
> >
> > check this out (repeabale): while true; do gmake -s clean && time
> > gmake -s -j 8; done
> >
> > 14.3:
> > gmake -s -j 8  8.93s user 2.03s system 769% cpu 1.42s (1.424) total
> > gmake -s -j 8  9.02s user 2.16s system 757% cpu 1.48s (1.475) total
> > gmake -s -j 8  9.29s user 1.95s system 774% cpu 1.45s (1.450) total
> > gmake -s -j 8  8.97s user 2.46s system 770% cpu 1.48s (1.484) total
> > gmake -s -j 8  9.13s user 2.30s system 773% cpu 1.48s (1.477) total
> 14.3 clang/lld are probably statically linked, but I am not sure.
> Can you confirm this?
>

They are dynamic, this was switched years ago.

/usr/bin/clang: ELF 64-bit LSB executable, x86-64, version 1
(FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for
FreeBSD 14.3, FreeBSD-style, stripped

> >
> > 15.0:
> > gmake -s -j 8  19.90s user 3.02s system 773% cpu 2.96s (2.963) total
> > gmake -s -j 8  19.90s user 3.18s system 774% cpu 2.98s (2.979) total
> > gmake -s -j 8  20.24s user 2.90s system 770% cpu 3.00s (3.005) total
> > gmake -s -j 8  19.92s user 3.25s system 771% cpu 3.00s (3.003) total
> > gmake -s -j 8  20.25s user 2.95s system 772% cpu 3.01s (3.006) total
> But 15.0 is definitely dynamically linked.
>
> clang is enormous C++ binary with enormous amount of relocs:
> $ ldd /usr/bin/cc
> /usr/bin/cc:
>         libprivateclang.so.19 => /usr/lib/libprivateclang.so.19 
> (0x27417e200000)
>         libprivatellvm.so.19 => /usr/lib/libprivatellvm.so.19 (0x274183e00000)
>
> $ objdump -R /usr/lib/libprivateclang.so.19 | wc -l
>   232977
> $ objdump -R /usr/lib/libprivatellvm.so.19 | wc -l
>   140712
>
>
> >
> > user time *skyrocketed*
>

Reply via email to