やあ子供たち。今日はSTLのstd::⇒ vector, list, set, dequeのパフォーマンス測定の実験をしたよ。以下のようなコードだ。試してみてくれ。 #include <iostream> #include <vector> #include <list> #include <algorithm> #include <ctime> #include <set> #include <deque> using namespace std; #define N 1000000 #define P 400000 class less_than_4000 { public: bool operator()( int i ){ return i<P; } }; int main( int argc, char* argv[] ) { vector< int > vec; list< i
![vector, list, set, dequeのパフォーマンスを実験したよ - nursの日記](https://cdn-ak-scissors.b.st-hatena.com/image/square/3cb487fdb9d7a58d25501fe7bf6f7e7ef9060472/height=288;version=1;width=512/https%3A%2F%2Fimages-fe.ssl-images-amazon.com%2Fimages%2FI%2F41W5R878R7L._SL160_.jpg)