|
|
Message-Id: <DF4ZMQ4KBPSD.33EWXE5GEQTZ5@tum.de>
Date: Mon, 22 Dec 2025 20:21:26 +0100
From: "Fabian Rast" <fabian.rast@....de>
To: "Alexander Monakov" <amonakov@...ras.ru>
Cc: "Rich Felker" <dalias@...c.org>, <musl@...ts.openwall.com>
Subject: Re: [PATCH v2] ldso: skip gnu hash calculation if
precomputed
On Mon Dec 22, 2025 at 7:40 PM CET, Alexander Monakov wrote:
> You have a reduction in actual CPU cycles (-4%, similar to others) and an
> increase of the reference counter cycles (and the matching increase in
> wall-clock time), which means that your CPU was running at a lower frequency
> in this test. If it is reproducible, perhaps it's an artifact of how CPU's
> automatic frequency scaling works: without the hashing loop, most of the
> remaining work is low-IPC (lots of TLB and cache misses), so maybe it doesn't
> raise clocks in this case. You can test e.g. by running at a fixed frequency.
Yes, I reproduced this a couple of times and the explanation makes sense.
> (you may already know, but just in case: cpupower tool can be used for
> requesting a fixed frequency with the 'performance' governor; to disable
> turbo clocks on AMD CPUs, write '0' to /sys/devices/system/cpu/cpufreq/boost )
I did not know, so thanks a lot for this info, i really appreciate it!
The wall time regression is gone when benchmarking with disabled turbo boost:
master -> precomp bloom
/usr/bin/clang
cycles: 30595609 (0.52) -> 24689870 (0.62) -19.3%
instructions: 59173944 (0.01) -> 47476698 (0.01) -19.77%
ref-cycles: 30629075 (0.54) -> 24725304 (0.65) -19.28%
duration_time: 16338501 (0.58) -> 13351888 (0.71) -18.28%
/usr/bin/gsx
cycles: 41078342 (0.38) -> 36546838 (0.32) -11.03%
instructions: 56794652 (0.02) -> 41060367 (0.02) -27.7%
ref-cycles: 41047786 (0.4) -> 36539161 (0.33) -10.98%
duration_time: 22042062 (0.47) -> 19687133 (0.37) -10.68%
/usr/bin/ffmpeg
cycles: 61538791 (0.25) -> 54242735 (0.26) -11.86%
instructions: 87089975 (0.01) -> 58410309 (0.01) -32.93%
ref-cycles: 61433880 (0.27) -> 54181257 (0.28) -11.81%
duration_time: 32478566 (0.3) -> 28788301 (0.34) -11.36%
/usr/bin/mpv
cycles: 170858084 (0.16) -> 149992274 (0.12) -12.21%
instructions: 265719013 (0.0) -> 162564417 (0.01) -38.82%
ref-cycles: 169971792 (0.16) -> 149229465 (0.13) -12.2%
duration_time: 87288228 (0.18) -> 76845305 (0.15) -11.96%
/usr/lib/libreoffice/program/soffice.bin
cycles: 139990660 (0.21) -> 124937532 (0.22) -10.75%
instructions: 267200691 (0.0) -> 200466090 (0.0) -24.98%
ref-cycles: 139272339 (0.21) -> 124308124 (0.22) -10.74%
duration_time: 71883190 (0.23) -> 64386860 (0.24) -10.43%
/usr/lib/libwebkit2gtk-4.1.so.0
cycles: 188684348 (0.16) -> 168941948 (0.13) -10.46%
instructions: 330772629 (0.0) -> 233988146 (0.01) -29.26%
ref-cycles: 187666505 (0.16) -> 168063105 (0.13) -10.45%
duration_time: 96330834 (0.18) -> 86599671 (0.15) -10.1%
/usr/lib/firefox/libxul.so
cycles: 54223456 (0.24) -> 49060865 (0.23) -9.52%
instructions: 73184185 (0.01) -> 53532082 (0.01) -26.85%
ref-cycles: 54127522 (0.25) -> 49003711 (0.23) -9.47%
duration_time: 28769607 (0.28) -> 26139117 (0.28) -9.14%
Now the "cycles" stats are also much closer to the "ref-cycles".
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.