title: boost::interprocess message_queue performance - rather slow?
body: <p>I need an ultra-fast MQ mechanism, where both sender and receiver are written in C++, on Windows platform.</p>
  
  <p>My current implementation using <a href="http://www.codeproject.com/KB/threads/Rcf_Ipc_For_Cpp.aspx" rel="noreferrer">RCF-C++</a> for IPC is clocking at around 20,000 msg/sec over Windows Named Pipes. </p>
  
  <p>I am testing the perf of boost::interprocess Message Queues according to <a href="http://www.boost.org/doc/libs/1_41_0/doc/html/interprocess/synchronization_mechanisms.html#interprocess.synchronization_mechanisms.message_queue" rel="noreferrer">the demo app</a>, and am measuring around 48,000 messages/sec, which is surprisingly slow, considering that when I cooked up a simple Memory Mapped File communication on the same machine (in C# using <a href="http://techmikael.blogspot.com/2010/02/blazing-fast-ipc-in-net-4-wcf-vs.html" rel="noreferrer">code from this blog post</a>), I got around 150,000 messages/sec.</p>
  
  <p>Any idea about why I'm getting such slow performance out of boost message_queue, and what I can try to improve it?</p>