bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sr #110285] Probes for C++11 and C11 are too slow


From: Zack Weinberg
Subject: [sr #110285] Probes for C++11 and C11 are too slow
Date: Mon, 27 Jul 2020 14:24:29 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

URL:
  <https://savannah.gnu.org/support/?110285>

                 Summary: Probes for C++11 and C11 are too slow
                 Project: Autoconf
            Submitted by: zackw
            Submitted on: Mon 27 Jul 2020 06:24:27 PM UTC
                Category: None
                Priority: 5 - Normal
                Severity: 3 - Normal
                  Status: In Progress
                 Privacy: Public
             Assigned to: zackw
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None

    _______________________________________________________

Details:

Reported by Peter Eisentraut on the autoconf mailing list:

> ... the additional tests for C11 and C++11 are slow.  This entirely
> eliminates all the performance improvements made elsewhere.  In
> particular, the test
>
> checking for g++ option to enable C++11 features... none needed
>
> takes on the order of 10 seconds for some developers.  And that is for
> one loop, since "none needed"; good luck if you need more than none.

This is because the test probes for C++11 *library* features, and the C++
standard library is notoriously heavyweight.  The test program used by
_AC_PROG_CXX_CXX11 is only about 150 lines long but it expands to 47,000 lines
of gnarly template classes after preprocessing, and roughly 30,000 assembly
instructions after compilation. With -g enabled (as is the default) 770,000
lines of debug information are also emitted into the assembly.

(By way of comparison, the test program used by _AC_PROG_CXX_CXX98 also
expands to 47,000 lines of standard-library template classes after
preprocessing, but they're not nearly as gnarly.  The assembly output has only
about 2000 lines of actual instructions and 90,000 lines of debug
information.)

Both of these tests are new since Autoconf 2.69, so there's no installed base
depending on this behavior.  The equivalent macro from the Autoconf Macro
Archive,
https://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_cxx_compile_stdcxx.m4
, only tests for *language* features; I think it would be reasonable to make
our tests do the same.  Unfortunately we can't just uplift that code without
first chasing a bunch of copyright assignments.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?110285>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]