Comments (1)
Update on this ticket: after landing #126 (and the concern that the prefiltering in #126 might be problematic faded away - #131) I think the bottleneck described above is likely somewhat mitigated. We saw that contextSortByRelev
was a major hotspot when I presume, we were sorting hundreds or thousands of contexts. After the prefiltering in #126 I think we'll be sorting fewer. However this all should be tested. Someone interested in performance could:
- profile with
perf
in production to see ifcontextSortByRelev
is still a bottleneck (https://jvns.ca/perf-zine.pdf) - if it is then you could print out (or debug with lldb/gdb) how many context objects we're sorting now - are we still sorting an obscene amount for some queries? If so perhaps we could be even more aggressive than I was in #126 by doing something like:
diff --git a/src/coalesce.cpp b/src/coalesce.cpp
index 9f517d3..c6e2ae5 100644
--- a/src/coalesce.cpp
+++ b/src/coalesce.cpp
@@ -312,7 +312,7 @@ inline std::vector<Context> coalesceMulti(std::vector<PhrasematchSubq>& stack, c
} else if (covers[0].mask > covers[1].mask) {
context_relev -= 0.01;
}
- if (maxrelev - context_relev < .25) {
+ if (maxrelev - context_relev < .15) {
contexts.emplace_back(std::move(covers), context_mask, context_relev);
}
} else if (first || covers.size() > 1) {
@@ -333,7 +333,7 @@ inline std::vector<Context> coalesceMulti(std::vector<PhrasematchSubq>& stack, c
// append coalesced to contexts by moving memory
for (auto&& matched : coalesced) {
for (auto&& context : matched.second) {
- if (maxrelev - context.relev < .25) {
+ if (maxrelev - context.relev < .15) {
contexts.emplace_back(std::move(context));
}
}
from carmen-cache.
Related Issues (20)
- [setgrid] Add unit tests for _set() with grid objects HOT 1
- [setgrid] Add an encodeGrid() cpp method HOT 1
- [setgrid] Wire up encodeGrid() and _set() HOT 1
- [setgrid] Building dev binaries HOT 1
- Flapping test failures in asan travis job HOT 1
- Refactor Plan HOT 9
- Refactor followup: enable LTO HOT 7
- Use `-Werror` and `-isystem` HOT 3
- Illegal instruction on Node 8 HOT 3
- Documenting most recent bottlenecks detected HOT 3
- Don't publish binaries for git tags HOT 2
- Update scoredist implementation
- Refactor coalesce to reduce duplicate get operations
- Review Travis CI and Warning options.
- Place of binary
- Use `numeric_cast` for narrowing conversions HOT 2
- Update RocksDB: 4.13 -> 5 HOT 4
- Upstream: undo feature id sharding HOT 3
- [setgrid] Set Grid Quest HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carmen-cache.