[C++-sig] Profiling object instantiation... a preliminary report

David Abrahams david.abrahams at rcn.com
Thu Mar 7 15:41:16 CET 2002


----- Original Message -----
From: "Greg Landrum" <greglandrum at earthlink.net>

> I had exposed 4 different constructors for my Mol class.  What I
failed to
> realize is that when you overload functions (at least constructors) in
BPL,
> this is handled using exceptions.

Ah, well, that's been changed for Boost.Python v2.

> This was at least partially responsible
> for the tremendous slow down in the Boost wrapper of my code.

Not surprising.

> When I
> commented out some constructors, rebuilt, and reprofiled my code I got
a
> run time of 1.9 seconds, only twice the Cxx run time.  I'm a lot
happier
> with this, but I'll continue to do a bit of exploration to see if I
can
> bring that down more.

Interesting. I'd be very interested to hear how Boost.Python v2 performs
on your code, with or without overloads.

-Dave






More information about the Cplusplus-sig mailing list