[C++-sig] Compile times using Boost::python.

gideon may gideon at computer.org
Wed Jun 4 23:59:01 CEST 2003


Regarding compilation on Linux in debug mode (gcc 3.2),
I have extremely long linking phases, sometimes up to an hour
with my application :(. Is there a way to speed this up ?
Linking without debug info is much faster.

Must say the MS VC7 is much faster in this respect, at least 5 times.

I've got a 1GHz pentium with 256 Mb, which should be enough
(no swapping occurs).

--On Wednesday, June 04, 2003 2:48 PM -0700 "Ralf W. Grosse-Kunstleve" 
<rwgk at yahoo.com> wrote:

> --- Kerim Borchaev <warkid at hotbox.ru> wrote:
>>    System P4-1800, 512Mb.
>>    Project consists of 12 files(~12 classes, 100-200 methods).
>>    Compiling it with MSVC7 takes 2 minutes.
>>
>>    Isn't in too long?
>
> I also wish compilation would go faster, but if you look at a
> preprocessed file you will not be surprised anymore.
>
>> What are your numbers?
>
> Similar.
>
>>    How can I speed it up?
>
> The way I view it:
>
> 1. Boost.Python is highly efficient in minimizing the work for the
> programmer (expensive in terms of money) by using the available computing
> resources (cheap in comparison).

That's absolutely right, and leaves the programmer some time to read mail
and newsgroups ;)

>
> 2. Once you have your (run)time-consuming core algorithms implemented in
> C++ and wrapped with Boost.Python you can spend most of your time working
> with the much more pleasant Python language. I am sometimes going for
> weeks without recompiling.

Except if you're actively developing the wrapper library and looking
for bugs in your code.

>
> If I have to recompile I am using SCons which supports parallel builds
> (the -j option). Amazingly, our latest dual-CPU PC (for <$3k) allows me
> to use -j 4 and is indeed about 3.8 times faster than compiling with one
> CPU. I hear this is due to hyper-threading.

Ah, waiting for the laptop with dual P4, like to sit on the balcony while
coding. Especially when it's really nice weather outside.

ciao,

gideon




More information about the Cplusplus-sig mailing list