Skip to content

perf: improve default case of equal constraint by decoding in bulk#125

Draft
jesusvazquez wants to merge 1 commit intomainfrom
jvp/perf-eq-constraint
Draft

perf: improve default case of equal constraint by decoding in bulk#125
jesusvazquez wants to merge 1 commit intomainfrom
jvp/perf-eq-constraint

Conversation

@jesusvazquez
Copy link
Contributor

Michael's idea to improve an inefficient Get() access for non ascending primary columns

Before we were doing

for j := bl; j < br; j++ {
    if !ec.matches(symbols.Get(j)) {  // Individual lookup per row
        // ...
    }
}

Now we're doing

symbols.DecodeBuffer(buf, bl, br) // Single bulk dictionary lookup
for j := bl; j < br; j++ {
    if !ec.matches(buf[j-bl]) { // Direct array access
        // ...
    }
}

var l, r int
switch {
case cidx.IsAscending() && primary:
symbols.Reset(pg)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved this up since its now needed for both cases

@jesusvazquez jesusvazquez marked this pull request as draft November 7, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant