0

To continue another question, lets ask this:

How does Boost implement the signals/slot mechanism?

See: How signal and slots are implemented under the hood? http://www.boost.org/doc/libs/1_40_0/doc/html/signals.html

Community
  • 1
  • 1
elcuco
  • 8,948
  • 9
  • 47
  • 69

1 Answers1

2

here's an interesting snippet from this gamedev.net thread to get the discussion rolling

Original post by Spoonbender So, bonus question: What causes boost::signals to be that much slower?

It looks like there are a couple of biggies. First, despite the fact that boost::signals isn't threadsafe, it enters and leaves critical sections a couple of times. Secondly, there's this named-slots thingy which seems to result in overly complex data structures which take a long time to iterate over. And then there's a lot of nickel-and-diming from various housekeeping things it does. Finally, the individual calls have much higher overhead because of boost::bind's runtiminess. It's all functionality that I'm sure someone has a need for, but I don't.

Dustin Getz
  • 21,282
  • 15
  • 82
  • 131