[Development] Feature Freeze Exception: QStringView

Thiago Macieira thiago.macieira at intel.com
Tue Feb 7 20:21:30 CET 2017


Em terça-feira, 7 de fevereiro de 2017, às 20:06:38 PST, Konstantin Tokarev 
escreveu:
> 07.02.2017, 20:03, "Vincas Dargis" <vindrg at gmail.com>:
> > 2017.02.06 18:38, Thiago Macieira rašė:
> >>  Yes, but it's very hard to measure. I do agree in shrinking our code
> >> however much we can (which is why I'd like to suppress the unwind tables
> >> completely).> 
> > Sorry for off-topic, but I wonder, have anyone measured how Qt modules
> > sizes differs with and without `noexcept` being in effect?
> 
> It's not about size only, having exceptions enabled makes some compiler
> optimizations impossible, because new paths of execution flow become
> possible.

Right. The difference is in the calling code, mostly.

But note we do *not* mark our methods in libraries outside of QtCore as 
noexcept. They will never throw, but we don't mark them as such. There's also 
a policy in place that we don't mark nothrow any narrow-contract function.

The difference, as we discussed before, is in having smaller code because of 
the absence of the exceptional code paths. Since we know we won't throw, we 
can suppress that code and gain in memory pressure and cache utilisation, both 
of which are very hard to measure an effect on.

I've toyed with the idea of suppressing the unwind tables completely (see 
review I2bc52f3c7a574209b213fffd149b5028b27b0395). That change applies it only 
to bootstrapped tools, since we control the execution, but not for libraries. 
The unwind tables may be used by other things besides exceptions, like POSIX 
asynchronous thread cancellations and backtrace dumps.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list