Conversation
b47b8ee to
ea92b83
Compare
ea92b83 to
7de3263
Compare
|
@seqbenchbot up main search-logbench --skip-bulk-comparison |
|
Nice, @cheb0 The benchmark with identificator Show summary
Have a great time! |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Conflicts: # node/bench_test.go
🔴 Performance DegradationSome benchmarks have degraded compared to the previous run. Show table
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #358 +/- ##
==========================================
- Coverage 71.29% 71.29% -0.01%
==========================================
Files 206 206
Lines 15145 15156 +11
==========================================
+ Hits 10798 10805 +7
- Misses 3559 3564 +5
+ Partials 788 787 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🔴 Performance DegradationSome benchmarks have degraded compared to the previous run. Show table
|
🔴 Performance DegradationSome benchmarks have degraded compared to the previous run. Show table
|
🔴 Performance DegradationSome benchmarks have degraded compared to the previous run. Show table
|
Description
Adds a zero-cost comparison for LIDs in iterators, unblocks NextGEQ (need fast comparisons and
minfunction for NextGEQ to be effective)Details
Instead of calling the
n.lesscomparator, we introduce a new type which hides all comparison logic. It's a structnode.LID(name can be changed).Struct size is 64 bits. For default order (desc) we keep two fields:
lid: LID (32 bits), XOR mask: 0 (32 bits)For reverse (order asc) we keep:
lid: LID ^ 0xFFFFFFFFF (32 bits), mask: 0xFFFFFFFFF (32 bits)To unpack a LID we just do
lid ^ mask.This makes masked LID value always go in ascending way (both orders). i.e. for default order (docs sort desc) LIDs remain unchanged, but for reverse odder (docs sort asc) higher LID values are transformed to lower values in lid field in
LIDstruct. Therefore, nodes no longer need to maintainreverseflag and execute same code for both orders. We can also effieciently compare values via ordinary<. We can also support efficientmin/maxfunction.Leaf nodes (
IteratorDesc/Asc,staticAsc/Desc) return terminal values. For default order we return the last LID asMaxUint32, for reverse order it's0. Inversion makes both values equal (first 32 bits), we can always tell if it's null value just by comparing withMaxUint32.Because null values are represented as
MaxUint32masked lid, we can eliminate unneeded if checks. Previously we had:n.hasLeft && n.less(n.leftID, n.rightID)Now we can just:
leftID.Less(rightID)Because null values are represented as
MaxUint32, this if check will never pass ifleftIDis null.The encoded
LIDvalue is yielded directly from eval tree (search) and passed right to agg tree, where it can also be effectively compared to different values.Measurements
Fractions taken from prod:
service:large_service, count by k8_pod (hot, data cached)master: ~470 ms
fast cmp: ~420 ms
service:small_service, count by k8_pod (hot, data cached)master: ~400 ms
fast cmp: ~330ms