> Date: Tue, 29 Aug 2023 15:42:27 -0400
> From: Marek Polacek via Gcc-patches <gcc-patches@gcc.gnu.org>

> Surely, there must be no ABI impact, the option cannot cause
> severe performance issues,

> Currently, -fhardened enables:
...
>   -ftrivial-auto-var-init=zero

> Thoughts?

Regarding -ftrivial-auto-var-init=zero, I was consulted when
colleagues investigating a performance regression
pint-pointed it as *causing severe performance issues*;
cf. https://github.com/systemd/systemd.git commit 1a4e392760
(TL;DR: adds "-ftrivial-auto-var-init=zero" to the systemd
build).

The situation was described as "we noticed that some test
suites takes 35% percent longer time to finish.  After
further investigation it was noticed that running systemctl
unmask x takes around 5s more time on [version including
patch vs. before that patch]" (timing out some tests).
Reverting that patch fixed the drop in performance.

Just a data point, but I believe also exactly your intended
use.  IMO including -ftrivial-auto-var-init is worth extra
consideration.

Alternatively, strike the while "cannot cause severe
performance issues".

brgds, H-P

Reply via email to