
I have tested already also a vector<boost::function> against the boost::signal. The vector (able to disconnect during events) was about 2 times slower than boost::function. I have made now also tests with the new boost::signal library which should replace in the future this one. It is about 70times slower.... In the next days I want to make a comparsion with other eventhandlers.. I will post than the results. Best regards Hansjörg Alex MDC schrieb:
I think it's not so much that boost::signal is slow, just that boost::function is really fast :)
But you're comparison isn't very fair - at the least you should compare a vector<boost::function> to a boost::signal and see how the performance goes with 1, 2, 10 etc event handlers on each event. Then fix it up so you can disconnect an event handler during an event and see how the performance goes then (that's the mimimum you'd need for a usable construct).
I remember reading some threads a while back about the slowness of boost::signal, and it's large array of features which are rarely used. Try and find them for some more info.
Personally I'd be interested in a comparison between boost::signal and similar multi-event handler constructs in other languages, like C# events.
Regards, Alex MDC _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost