SlotSig benchmarks

Speed and memory usage may be concerns when using a signal/slots library. They're not really an issue when you have vew signals connected to few slots, but imagine an application creations thousands of signals, each connected to thousands of slots... So I decided to work on speed, and compare SlotSig with some other libraries :

The sigslot library has not been benchmarked, because it provides too less features than the others.

The programs used for the benchmarks can be found in the benchs directory in SlotSig distribution.. They have been compiled using g++ 4.0.2 (with -O2 optimisation), and executed on a Kubuntu Linux system, kernel version 2.6.12. Speaking hardware, the core processor is an Intel Pentium IV 3.2Ghz, system RAM is 1GB. The tests where performed in a moderatly-loaded system (running KDE) to have a kind of "real-world" running environment. Pictures were generated using GnuPlot.

Three kinds of benchmarks were done :

SlotSig itself has been tested in two configurations, the default one which ensures uniqueness of a signal/slot pair, and the one which doesn't bother about uniqueness.

As for every benchmarks, take the numbers for what they are and nothing more.

So, here are the results.

Speed of connections
one to many

one to many - speed
many to one

many to one - speed
random many to many

random many to many - speed

Memory used
one to many one to many - memory
many to one many to one - memory
random many to many random many to many - memory

Calling slots speed
one to many one to many - call speed
many to one many to one - call speed
random many to many random many to many - call speed

Speed of disconnections
one to many one to many - disconnection speed
many to one many to one - disconnection speed
random many to many random many to many -

If you have some idea of other bench you would like to see, let me know.


Last update 2006-04-17