diff options
Diffstat (limited to 'benchmarks')
| -rw-r--r-- | benchmarks/watermark_testing.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/benchmarks/watermark_testing.cpp b/benchmarks/watermark_testing.cpp index caba8ff..5fa0c0d 100644 --- a/benchmarks/watermark_testing.cpp +++ b/benchmarks/watermark_testing.cpp @@ -5,15 +5,17 @@ #define ENABLE_TIMER #include "framework/DynamicExtension.h" -#include "shard/ISAMTree.h" +#include "shard/TrieSpline.h" #include "query/rangequery.h" #include "framework/interface/Record.h" #include "psu-util/timer.h" +#include <algorithm> -typedef de::Record<int64_t, int64_t> Rec; -typedef de::ISAMTree<Rec> ISAM; +typedef uint64_t K; +typedef de::Record<K, K> Rec; +typedef de::TrieSpline<Rec> ISAM; typedef de::rq::Query<Rec, ISAM> Q; typedef de::DynamicExtension<Rec, ISAM, Q> Ext; @@ -23,7 +25,14 @@ int main(int argc, char **argv) { std::vector hwms = {5000l, 10000l, 20000l, 50000l}; std::vector lwms = {.1, .2, .3, .4, .5, .6, .7, .8, .9}; - size_t n = 1000000; + size_t n = 1000000000; + + std::vector<K> keys(n); + for (K i=0; i<n; i++) { + keys[i] = i; + } + + std::random_shuffle(keys.begin(), keys.end()); TIMER_INIT(); @@ -33,8 +42,8 @@ int main(int argc, char **argv) { auto extension = new Ext(lwm, hwm, 8); TIMER_START(); - for (int64_t i=0; i<n; i++) { - Rec r = {i, i}; + for (size_t i=0; i<n; i++) { + Rec r = {keys[i], keys[i]}; while (!extension->insert(r)) { _mm_pause(); } |