[zeromq-dev] STL use in zeromq

Mikael Helbo Kjær mhk at designtech.dk
Mon Nov 1 08:29:40 CET 2010


Hi Pieter

I didn't get to posting my follow up Friday but it turns out that I had made the second set of tests using a debug build rather than a release build which was a significant disadvantage for the erase-remove idiom and even all the way down to the 100 element array it was faster than the current way 0mq does things. The erase remove idiom was faster even on much much smaller vectors and often by an order of magnitude as well.

I now think it is very likely a performance gain for 0mq if it is implemented or at the least we should try it out. I am willing to produce a few patches against the current 0mq git master for this if you or someone else is interested in testing it (I don't really have time to spare for much more at the moment unfortunately). Just point out a place you'd like a patch for.

> > I had a few moments so I tested a scale of values from 100 to 10000
> in vector sizes. The Erase-remove idiom is indeed more expensive until
> the vectors grow to be around 10k elements.
> 
> Thanks for taking the time to work this though.  In general (and
> especially in code that has this many layers of abstraction) you want
> to test all performance assumptions against running code.  Theory is
> great in theory but in practice, practice is better. :-)

Regards,
Mikael




More information about the zeromq-dev mailing list