Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index



On Wed, 2012-02-29 at 08:42 +0100, Stephan Bergmann wrote:
But how bad is that, anyway?  A little experiment shows that the 
compiler will happily outline those inline functions detecting for 
bad_alloc, creating one instance of them per library.

        Heh ;-) so - I'd love to see the size difference between two identical
LibreOffice's compiled with and without those exceptions enabled - of
course, the fact that there is just one function is interesting (and
encouraging), but the required unwind tables for all these exceptions
that (in practise) never ever happen impact every single method that
uses strings, and stops us marking other methods as not throwing
exceptions (and/or detecting that during LTO as/when we get there).
Presumably since LTO does a lot of this manual propagation of real (as
opposed to annotated) exception throwing state, until we start doing
that aggressively in libmerged we won't really be able to get a good
idea of the real cost.

        Last I did the analysis (which was some years back) exception data is
10% of stripped binary code size - which is at least significant -
particularly if it is substantially unused ;-)

        Having said all this - I think we can agree that if we are calling this
new 'createFromAscii_WithLength' method - which is (currently) only
called during these magic constructors for compile time constants, that
the chance of having a 4Gb compile-time constant string in the source is
somewhat minimal ;-) and that there is certainly no need to throw an
exception and bloat the call-sites for this case at least.

        All the best,

                Michael.

-- 
michael.meeks@suse.com  <><, Pseudo Engineer, itinerant idiot


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.