This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bad compile time complexity for large files ??? (fwd)
- From: Gabriel Dos Reis <gdr at cs dot tamu dot edu>
- To: gcc at gcc dot gnu dot org
- Cc: vdhoeven at texmacs dot org
- Date: Thu, 11 Nov 2004 15:40:21 -0600 (CST)
- Subject: Re: Bad compile time complexity for large files ??? (fwd)
---------- Forwarded message ----------
Date: Thu, 11 Nov 2004 18:46:26 +0100 (CET)
From: Joris van der Hoeven <vdhoeven@texmacs.org>
To: Gabriel Dos Reis <gdr@cs.tamu.edu>
Cc: vdhoeven@texmacs.org
Subject: Re: Bad compile time complexity for large files ???
Salut Gabriel,
Je viens de nettoyer un peu mes bench et de les refaire pour les deux
versions de g++. Voici les resultats ; merci de les forwarder aux listes.
---------------------------------------------------------------
Hi *,
I have attempted to provide some more precise benchmarks which show
the worse than linear behaviour for the compilation time. If anyone is
interested in reproducing them (which implies that you have to install
mmxlib and mathemagix), then please let me know and I will try to
smooth the installation procedure.
First of all, let me explain more precisely what the timings stand for.
Mathemagix is a high level language, futuring template types like C++,
and which allows you to glue C++ template libraries (the interpreter is
still very slow, so this is a way to provide basic functionality at
a high speed). I also started to write a C++ template library Mmxlib
(the standard mathematical library for Mathemagix, containg many
routines for symbolic computation).
The glue description for Mmxlib contains two parts A (the scalar types)
and B (the template types). When compiling the generated glue code,
the contribution of each part should be relatively independent
(apart from a small overhead and some common includes).
Of course, part B will give rise to many template instantiations.
Now I made the following experiment: generate and compile 4 times
the glue code with A and B either disabled or enabled. I did this
both with gcc-2.95.3 and gcc-3.4.3. Here are the approximate timings:
-------------------------------------------------------------
Configuration Timings for gcc-2.95.3 Timings for gcc-3.4.3
-------------------------------------------------------------
None 1 2
A 25 14
B 58 18
A+B 192 51
-------------------------------------------------------------
One first remark: gcc-3.4.3 is quite a bit slower for small files,
but clearly much better for large files (which is encouraging).
Nevertheless, in both cases, one notices a behaviour which is much
worse than linear (191 > 81 and 49 > 28).
I hope that this "real-life experiment" convinces you that there is
still room for improvement. I am afraid that I cannot produce
a more incremental graph for you. A final note: I have a 2.4GHz
Athlon processor and 512Mb of memory.
Best wishes and thanks for your attention, Joris
-----------------------------------------------------------
Joris van der Hoeven <vdhoeven@texmacs.org>
http://www.texmacs.org: GNU TeXmacs scientific text editor
http://www.math.u-psud.fr/~vdhoeven: personal homepage
-----------------------------------------------------------