From 381eab1f3dc306e7cb26d3b72b1bd54421f74fd4 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 e0e4fade5..27c949be2 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 @@ -196,6 +197,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