-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
You're going to have to provide a link.
On Wednesday 22 July 2009, Sajjan Kalle wrote:
> I did a search on the mailing list and found a
> discussion from 2005 on the performance of the library, results at that
> time showed a vector with boost::function being about 100 times faster than
> boost::signals.
void
foo( ){
}
int
main(){
Altus::Timer tim; std::vector< boost::function< void ( void ) > > manualSignal; boost::signal< void ( void ) > boostSignal; for( unsigned int i = 0; i < 1000; ++i ){
manualSignal.push_back( &foo ); boostSignal.connect( &foo );}
double now = tim.GetTimeInMS(); for( unsigned int i = 0; i < 1000; ++i ){
for( unsigned int j = 0; j < 1000; ++j ) manualSignal[ i ]( );}
double diff = tim.GetTimeInMS() - now; std::cout << "took " << diff << " ms" << std::endl; now = tim.GetTimeInMS(); for( unsigned int i = 0; i < 1000; ++i ){
boostSignal( );}
diff = tim.GetTimeInMS() - now; std::cout << "took " << diff << " ms" << std::endl;}