4 Nov 01:31
Re: [signals2][review] The review of the signals2 library (formerly thread_safe_signals) begins today, Nov 1st
Frank Mori Hess <fmhess <at> speakeasy.net>
2008-11-04 00:31:23 GMT
2008-11-04 00:31:23 GMT
On Monday 03 November 2008 13:31, Michael Marcin wrote: > Frank Mori Hess wrote: > > boost::signal, 10 connections, tracking enabled, invoking 1000000 > > times: 0.78 s > > > > boost::signals2::signal, 10 connections, tracking enabled, invoking > > 1000000 times: 4.92 s > > Over 6 times slower in this case. That seems to warrant some concern. Almost 2 seconds of the overhead is due to atomic reference counting for shared_ptr. If I compile the benchmark with DISABLE_BOOST_THREADS I get: boost::signals2::signal, 10 connections, tracking enabled, invoking 1000000 times: 3.20 s Probably an similar sized chunk of overhead is due to a heap allocation inside the std::vector used to hold the tracked shared_ptr during invocation. That part is actually something that could be optimized, at least for slots tracking less than some arbitrary fixed number of shared_ptr (say 10).
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
RSS Feed