From: Jeremy Pack (rostovpack_at_[hidden])
Date: 2007-06-14 12:40:57
We have a number of other benchmarks to write. The basic test Mariano did
(which is in the subversion repository) opens a shared library, instantiates
a plugin, calls a very basic virtual function, deletes the plugin, and then
closes the shared library.
The minimal approach using direct dlopen,dlsym,dlclose was approximately
three times as fast (faster is expected - Boost.Extension does those same
calls underneath, and also has to store a bunch of type information).
Using profiling, it appeared that most of the overhead was in string
creation and destruction, because the current implementation uses strings
for type info by default (since some platforms can't just compare type_info
references across shared libraries). We're going to test it using integer
IDs for type info, and see what the result is. It may actually work with
const char * instead of string as well. We're also going to test it using
type_info references on platforms that support it. We'll try and post those
results next week.
We also need to test opening many shared libraries - opening the same shared
library repeatedly is not a great indicator of the actual load the library
will be under in real world situations. It is likely that the first time the
library loads takes much longer than the later loads - since the OS isn't
actually required to close the library when you ask it to.
On 6/13/07, Michael Marcin <mmarcin_at_[hidden]> wrote:
> Mariano Consoni wrote:
> > - We have done some benchmarking comparing extensions approach with
> > the old plain style using dlopen/dlsym/dlclose.
> Did it compare favorably?
> Michael Marcin
> Unsubscribe & other changes: http://lists.boost.org/mailman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk