From 69f36c9b4f5df19f09156689b333afe29a017eed Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Fri, 23 Feb 2024 15:40:49 -0500 Subject: Benchmark updates --- benchmarks/include/benchmark_types.h | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 benchmarks/include/benchmark_types.h (limited to 'benchmarks/include/benchmark_types.h') diff --git a/benchmarks/include/benchmark_types.h b/benchmarks/include/benchmark_types.h new file mode 100644 index 0000000..85e9565 --- /dev/null +++ b/benchmarks/include/benchmark_types.h @@ -0,0 +1,50 @@ +#pragma once + +#include +#include "psu-ds/BTree.h" +#include "mtree.h" +#include "framework/interface/Record.h" + +/* TLX BTree definitions*/ +template +struct btree_record { + K key; + V value; + + inline bool operator<(const btree_record& other) const { + return key < other.key || (key == other.key && value < other.value); + } + + inline bool operator==(const btree_record& other) const { + return key == other.key && value == other.value; + } +}; + +template +struct btree_key_extract { + static const K &get(const btree_record &v) { + return v.key; + } +}; + +typedef psudb::BTree, btree_key_extract> BenchBTree; + + +/*MTree Definitions*/ + +const size_t W2V_SIZE = 300; +typedef de::EuclidPoint Word2VecRec; + +struct euclidean_distance { + double operator()(const Word2VecRec &first, const Word2VecRec &second) const { + double dist = 0; + for (size_t i=0; i MTree; + -- cgit v1.2.3 From b1b5ab106122e6917f6b34452be95e617506f05d Mon Sep 17 00:00:00 2001 From: "Douglas B. Rumbaugh" Date: Mon, 25 Mar 2024 12:54:17 -0400 Subject: Updates for build on OpenBSD Necessary updates to get the codebase building under OpenBSD 7.5 with clang. This is a minimal set of changes to get building to work, which includes disabling several things that aren't directly compatable. More work will be necessary to get full functionality. In particular, Triespline, PGM, and the reference M-tree do not currently build on OpenBSD with clang due to GNU dependencies or other gcc specific features. --- benchmarks/include/benchmark_types.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'benchmarks/include/benchmark_types.h') diff --git a/benchmarks/include/benchmark_types.h b/benchmarks/include/benchmark_types.h index 85e9565..fcdeac6 100644 --- a/benchmarks/include/benchmark_types.h +++ b/benchmarks/include/benchmark_types.h @@ -2,7 +2,6 @@ #include #include "psu-ds/BTree.h" -#include "mtree.h" #include "framework/interface/Record.h" /* TLX BTree definitions*/ @@ -46,5 +45,8 @@ struct euclidean_distance { } }; +#ifdef _GNU_SOURCE +#include "mtree.h" typedef mt::mtree MTree; +#endif -- cgit v1.2.3 From 4a1dde3148e0e84b47c884bc0bb69c60678b4558 Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Mon, 22 Apr 2024 15:09:07 -0400 Subject: Benchmark update+reorganization The Alex benchmark isn't updated yet. --- benchmarks/include/benchmark_types.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'benchmarks/include/benchmark_types.h') diff --git a/benchmarks/include/benchmark_types.h b/benchmarks/include/benchmark_types.h index fcdeac6..13964e8 100644 --- a/benchmarks/include/benchmark_types.h +++ b/benchmarks/include/benchmark_types.h @@ -3,8 +3,9 @@ #include #include "psu-ds/BTree.h" #include "framework/interface/Record.h" +#include "pgm/pgm_index_dynamic.hpp" -/* TLX BTree definitions*/ +/* BTree definitions*/ template struct btree_record { K key; @@ -50,3 +51,5 @@ struct euclidean_distance { typedef mt::mtree MTree; #endif +typedef pgm::DynamicPGMIndex> PGM; + -- cgit v1.2.3 From 265610435e1164a9acc39ca02ea1139acd37c46c Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Thu, 9 May 2024 14:10:29 -0400 Subject: Added benchmarks for BigANN --- benchmarks/include/benchmark_types.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'benchmarks/include/benchmark_types.h') diff --git a/benchmarks/include/benchmark_types.h b/benchmarks/include/benchmark_types.h index 13964e8..51fc52d 100644 --- a/benchmarks/include/benchmark_types.h +++ b/benchmarks/include/benchmark_types.h @@ -35,6 +35,9 @@ typedef psudb::BTree, btree_key_extract< const size_t W2V_SIZE = 300; typedef de::EuclidPoint Word2VecRec; +const size_t ANNSize = 128; +typedef de::EuclidPoint ANNRec; + struct euclidean_distance { double operator()(const Word2VecRec &first, const Word2VecRec &second) const { double dist = 0; @@ -44,11 +47,21 @@ struct euclidean_distance { return std::sqrt(dist); } + + double operator()(const ANNRec &first, const ANNRec &second) const { + double dist = 0; + for (size_t i=0; i MTree; +typedef mt::mtree MTree_alt; #endif typedef pgm::DynamicPGMIndex> PGM; -- cgit v1.2.3