[zeromq-dev] STL use in zeromq

Martin Sustrik sustrik at 250bpm.com
Mon Nov 1 08:41:10 CET 2010

Hi Mikael,
> 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.
Fair enough.

Let's start with the polling classes (select/poll/epoll/devpoll/kqueue). 
The list of registered fds can grow pretty large, especially when 0mq is 
used to implement a server. In such cases, the size of the array can 
grow as high as 10k.

Start with the polling mechanism that's used on your box. Fix the 
problem, check whether 0mq still works (make check, perf tests). If OK, 
submit the patch.


More information about the zeromq-dev mailing list