From a44355019e5a27da0d5e5287aae74864e4122e1f Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 19 Feb 2015 15:30:03 +0200 Subject: [PATCH] Use deque rather than list for queues List makes one allocation for every item, deque only one per a bunch of items. --- source/libr2c2/arducontrol.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/libr2c2/arducontrol.h b/source/libr2c2/arducontrol.h index a48f6f0..d68a149 100644 --- a/source/libr2c2/arducontrol.h +++ b/source/libr2c2/arducontrol.h @@ -1,6 +1,7 @@ #ifndef LIBR2C2_ARDUCONTROL_H_ #define LIBR2C2_ARDUCONTROL_H_ +#include #include #include #include @@ -214,7 +215,7 @@ private: class Queue { private: - std::list items; + std::deque items; Msp::Mutex mutex; public: -- 2.45.2