From: Mikko Rasa Date: Thu, 19 Feb 2015 13:30:03 +0000 (+0200) Subject: Use deque rather than list for queues X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=a44355019e5a27da0d5e5287aae74864e4122e1f;p=r2c2.git Use deque rather than list for queues List makes one allocation for every item, deque only one per a bunch of items. --- 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: