Re: [scheme-reports-wg2] Threads and futures Linas Vepstas (19 Mar 2022 05:54 UTC)
Re: [scheme-reports-wg2] Threads and futures Marc Nieper-Wißkirchen (19 Mar 2022 08:24 UTC)
Re: [scheme-reports-wg2] Threads and futures John Cowan (19 Mar 2022 18:57 UTC)
Re: [scheme-reports-wg2] Threads and futures Linas Vepstas (19 Mar 2022 20:04 UTC)
Re: [scheme-reports-wg2] Threads and futures Marc Nieper-Wißkirchen (19 Mar 2022 22:11 UTC)
Re: [scheme-reports-wg2] Threads and futures Linas Vepstas (20 Mar 2022 07:50 UTC)
Re: [scheme-reports-wg2] Threads and futures John Cowan (20 Mar 2022 22:34 UTC)
Re: [scheme-reports-wg2] Threads and futures Marc Feeley (21 Mar 2022 04:49 UTC)
Re: [scheme-reports-wg2] Threads and futures Marc Nieper-Wißkirchen (21 Mar 2022 06:28 UTC)
Re: [scheme-reports-wg2] Threads and futures Marc Nieper-Wißkirchen (21 Mar 2022 06:54 UTC)
Re: [scheme-reports-wg2] Threads and futures Ray Dillinger (21 Mar 2022 19:00 UTC)
Re: [scheme-reports-wg2] Threads and futures Dr. Arne Babenhauserheide (21 Mar 2022 16:54 UTC)
Re: [scheme-reports-wg2] Threads and futures Marc Nieper-Wißkirchen (21 Mar 2022 16:04 UTC)
Re: [scheme-reports-wg2] Threads and futures Taylan Kammer (23 Mar 2022 14:20 UTC)
Re: [scheme-reports-wg2] Threads and futures Marc Nieper-Wißkirchen (23 Mar 2022 14:28 UTC)
Re: [scheme-reports-wg2] Threads and futures Dr. Arne Babenhauserheide (23 Mar 2022 15:40 UTC)
Re: [scheme-reports-wg2] Threads and futures Marc Nieper-Wißkirchen (23 Mar 2022 15:34 UTC)
Re: [scheme-reports-wg2] Threads and futures Dr. Arne Babenhauserheide (23 Mar 2022 22:08 UTC)
Re: [scheme-reports-wg2] Threads and futures Ray Dillinger (01 Apr 2022 23:04 UTC)
Re: [scheme-reports-wg2] Threads and futures Per Bothner (01 Apr 2022 23:21 UTC)
Re: [scheme-reports-wg2] Threads and futures Ray Dillinger (01 Apr 2022 23:28 UTC)
Re: [scheme-reports-wg2] Threads and futures Per Bothner (01 Apr 2022 23:50 UTC)
Re: [scheme-reports-wg2] Threads and futures Ray Dillinger (02 Apr 2022 00:01 UTC)
Re: [scheme-reports-wg2] Threads and futures Per Bothner (02 Apr 2022 00:35 UTC)
Re: [scheme-reports-wg2] Threads and futures Linas Vepstas (10 Apr 2022 23:46 UTC)
Re: [scheme-reports-wg2] Threads and futures Linas Vepstas (27 Mar 2022 16:54 UTC)

Re: [scheme-reports-wg2] Threads and futures Per Bothner 02 Apr 2022 00:35 UTC

[Still off-topic]

On 4/1/22 17:00, Ray Dillinger wrote:
> Okay, I agree with you... it ought to be easy ... I can't think of a
> specific reason why it shouldn't be ... but take a large project that
> has libraries included from lots of different directions and by lots of
> different paths, and instrument the compiler. See whether it's spending
> 90% of its time parsing header files.  And you'll see that this
> optimization is not happening.  I assume there's some esoteric
> language-standard reason why not.

The compiler can optimize the case of A.h, B,h, and C.h where both B.h and C.h
do #include <A.h>, and the main file incluydes both B.h and C.h.

However, it is harder for the compiler to optimize the case when A.h and B.h
mutually include each other. In that case, adding the guards "by hand"
around the #include statement can be beneficial.

However, spending "90% of its time parsing header files" can still happen
if using a large library with dozens or hundreds of header files: A typical
.c/.cpp file will often include transitively dozens of header files, dwarfing
the text of the .c/.cpp files.  That is why there are been so many attempts
at precompiled header files.

Careful coding can help.  To use a Qt example: Instead of:
     #include <QtGui/QMouseEvent>
use the forward reference:
     class QMouseEvent;
(except when you actually need the specifics of QMouseEvent of course).
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/