From 0c8c55031ae451392641d0d427098d6e287bf005 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 16 Dec 2014 13:51:12 -0500 Subject: [PATCH] add deque to array alloc benchmark --- benchmark/test_array_allocation.cpp | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/benchmark/test_array_allocation.cpp b/benchmark/test_array_allocation.cpp index fe785b6a6..fb9d6d8bd 100644 --- a/benchmark/test_array_allocation.cpp +++ b/benchmark/test_array_allocation.cpp @@ -1,6 +1,7 @@ #include "bench_framework.hpp" #include #include +#include #include #include #include @@ -203,6 +204,33 @@ public: } }; +class test3d : public benchmark::test_case +{ +public: + uint32_t size_; + std::vector array_; + test3d(mapnik::parameters const& params) + : test_case(params), + size_(*params.get("size",256*256)), + array_(size_,0) { } + bool validate() const + { + return true; + } + bool operator()() const + { + for (std::size_t i=0;i data(size_); + for (std::size_t i=0;i