diff options
author | Arne Juul <arnej@verizonmedia.com> | 2020-01-20 11:48:56 +0000 |
---|---|---|
committer | Arne Juul <arnej@verizonmedia.com> | 2020-02-06 11:11:57 +0000 |
commit | e55728e48cd1f1cda6aadd8afb76f532b4174c7e (patch) | |
tree | c72f676256f37146c74d89d3fdfe3927d05bb83c /eval/src/tests/ann/xp-annoy-nns.cpp | |
parent | 42bd2d0b04b886285cdbf2f6478a63155a4b4f74 (diff) |
* remove benchmark
* redo ops tracking
* use std::aligned_alloc
* more stats - measure reach
Diffstat (limited to 'eval/src/tests/ann/xp-annoy-nns.cpp')
-rw-r--r-- | eval/src/tests/ann/xp-annoy-nns.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/eval/src/tests/ann/xp-annoy-nns.cpp b/eval/src/tests/ann/xp-annoy-nns.cpp index c34f9f6eb36..f022aae5974 100644 --- a/eval/src/tests/ann/xp-annoy-nns.cpp +++ b/eval/src/tests/ann/xp-annoy-nns.cpp @@ -12,11 +12,11 @@ using V = vespalib::ConstArrayRef<float>; class AnnoyLikeNns; struct Node; -static uint64_t plane_dist_cnt = 0; -static uint64_t w_cen_dist_cnt = 0; -static uint64_t leaf_split_cnt = 0; -static uint64_t find_top_k_cnt = 0; -static uint64_t find_cand_cnt = 0; +static size_t plane_dist_cnt = 0; +static size_t w_cen_dist_cnt = 0; +static size_t leaf_split_cnt = 0; +static size_t find_top_k_cnt = 0; +static size_t find_cand_cnt = 0; using QueueNode = std::pair<double, Node *>; using NodeQueue = std::priority_queue<QueueNode>; @@ -390,11 +390,11 @@ AnnoyLikeNns::topK(uint32_t k, Vector vector, uint32_t search_k) void AnnoyLikeNns::dumpStats() { fprintf(stderr, "stats for AnnoyLikeNns:\n"); - fprintf(stderr, "planeDistance() calls: %" PRIu64 "\n", plane_dist_cnt); - fprintf(stderr, "weightedDistance() calls: %" PRIu64 "\n", w_cen_dist_cnt); - fprintf(stderr, "leaf split() calls: %" PRIu64 "\n", leaf_split_cnt); - fprintf(stderr, "topK() calls: %" PRIu64 "\n", find_top_k_cnt); - fprintf(stderr, "findCandidates() calls: %" PRIu64 "\n", find_cand_cnt); + fprintf(stderr, "planeDistance() calls: %zu\n", plane_dist_cnt); + fprintf(stderr, "weightedDistance() calls: %zu\n", w_cen_dist_cnt); + fprintf(stderr, "leaf split() calls: %zu\n", leaf_split_cnt); + fprintf(stderr, "topK() calls: %zu\n", find_top_k_cnt); + fprintf(stderr, "findCandidates() calls: %zu\n", find_cand_cnt); std::vector<uint32_t> depths; _roots[0]->stats(depths); std::vector<uint32_t> counts; |