summaryrefslogtreecommitdiffstats
path: root/mojo
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-11 19:05:32 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-11 19:05:32 +0000
commit7d687af81a2683b07ee999968a4de0a3e1a4b989 (patch)
treece6f342406f35813e3ae33182df940422072ac7e /mojo
parent8822e4c664cbd9a687994b06e8642f57e3f25677 (diff)
downloadchromium_src-7d687af81a2683b07ee999968a4de0a3e1a4b989.zip
chromium_src-7d687af81a2683b07ee999968a4de0a3e1a4b989.tar.gz
chromium_src-7d687af81a2683b07ee999968a4de0a3e1a4b989.tar.bz2
Make MessagePipe use an std::deque instead of an std::list.
This yields ~10% performance improvement in the MessagePipe_WriteAndRead_10bytes portion of SystemPerftest.MessagePipe_WriteAndRead (from ~3 million iterations/second to ~3.3, on my Z620). R=darin@chromium.org, darin Review URL: https://codereview.chromium.org/26594009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228209 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo')
-rw-r--r--mojo/system/message_pipe.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/mojo/system/message_pipe.h b/mojo/system/message_pipe.h
index 2be2acd..e4c0c40 100644
--- a/mojo/system/message_pipe.h
+++ b/mojo/system/message_pipe.h
@@ -5,7 +5,7 @@
#ifndef MOJO_SYSTEM_MESSAGE_PIPE_H_
#define MOJO_SYSTEM_MESSAGE_PIPE_H_
-#include <list>
+#include <deque>
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
@@ -63,9 +63,8 @@ class MOJO_SYSTEM_EXPORT MessagePipe :
// These are *incoming* queues for their corresponding ports. It owns its
// contents.
// TODO(vtl): When possible (with C++11), convert the plain pointers to
- // scoped_ptr/unique_ptr. (Then we'll be able to use an |std::queue| instead
- // of an |std::list|.)
- std::list<MessageInTransit*> message_queues_[2];
+ // scoped_ptr/unique_ptr.
+ std::deque<MessageInTransit*> message_queues_[2];
WaiterList waiter_lists_[2];
DISALLOW_COPY_AND_ASSIGN(MessagePipe);