diff options
author | Geir Storli <geirst@vespa.ai> | 2024-04-02 14:29:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-02 14:29:23 +0200 |
commit | 6d78aece9c6f4960e3a8a04d95d2336165e28603 (patch) | |
tree | f3e3ce158b011c884b7fd6879236ab65ee93b380 /searchlib | |
parent | cb6b91aceb83dc7bf66159b1b9a9c549d58bd9cf (diff) | |
parent | 44a8653a6949ea65e749c3fb10fa860255389eeb (diff) |
Merge pull request #30781 from vespa-engine/havardpe/flow-calc-cleanup
remove array_cost since all strict ORs are now heaps
Diffstat (limited to 'searchlib')
3 files changed, 2 insertions, 6 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp b/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp index 8ffc43928e1..6d79f7bcb26 100644 --- a/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp +++ b/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp @@ -305,7 +305,7 @@ public: }; double est = OrFlow::estimate_of(MyAdapter(docid_limit), _estimates); return {est, OrFlow::cost_of(MyAdapter(docid_limit), _estimates, false), - OrFlow::cost_of(MyAdapter(docid_limit), _estimates, true) + queryeval::flow::array_cost(est, _estimates.size())}; + OrFlow::cost_of(MyAdapter(docid_limit), _estimates, true) + queryeval::flow::heap_cost(est, _estimates.size())}; } SearchIterator::UP diff --git a/searchlib/src/vespa/searchlib/queryeval/equiv_blueprint.cpp b/searchlib/src/vespa/searchlib/queryeval/equiv_blueprint.cpp index 61ae7b51de1..8b5e76085d2 100644 --- a/searchlib/src/vespa/searchlib/queryeval/equiv_blueprint.cpp +++ b/searchlib/src/vespa/searchlib/queryeval/equiv_blueprint.cpp @@ -72,7 +72,7 @@ EquivBlueprint::calculate_flow_stats(uint32_t docid_limit) const } double est = OrFlow::estimate_of(_terms); return {est, OrFlow::cost_of(_terms, false), - OrFlow::cost_of(_terms, true) + flow::array_cost(est, _terms.size())}; + OrFlow::cost_of(_terms, true) + flow::heap_cost(est, _terms.size())}; } SearchIterator::UP diff --git a/searchlib/src/vespa/searchlib/queryeval/flow_tuning.h b/searchlib/src/vespa/searchlib/queryeval/flow_tuning.h index 53f2be88c1f..51e544b2e30 100644 --- a/searchlib/src/vespa/searchlib/queryeval/flow_tuning.h +++ b/searchlib/src/vespa/searchlib/queryeval/flow_tuning.h @@ -10,10 +10,6 @@ inline double heap_cost(double my_est, size_t num_children) { return my_est * std::log2(std::max(size_t(1),num_children)); } -inline double array_cost(double my_est, size_t num_children) { - return my_est * num_children; -} - /** * The following constants and formulas were derived after analyzing term search over attributes * (with and without fast-search) and disk index by using the iterator benchmark program: |