-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expression: implement vectorized evaluation for builtinDurationDurationTimeDiffSig
#12838
Conversation
Codecov Report
@@ Coverage Diff @@
## master #12838 +/- ##
================================================
- Coverage 80.1069% 79.8991% -0.2079%
================================================
Files 465 465
Lines 107520 107632 +112
================================================
- Hits 86131 85997 -134
- Misses 14909 15142 +233
- Partials 6480 6493 +13 |
/run-all-tests |
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
@Reminiscent PTAL |
return err | ||
} | ||
defer b.bufAllocator.put(buf1) | ||
if err := b.args[1].VecEvalDuration(b.ctx, input, buf1); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can use result
to store one of the parameters, which helps us to reduce one memory allocation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will fix it.
continue | ||
} | ||
lhs := types.Duration{Duration: d64s[i]} | ||
rhs := types.Duration{Duration: d64s1[i]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can define lhs
and rhs
outside the for
loop, which saves two allocation for each loop iteration. It would improve the performance IMHO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will fix it.
What problem does this PR solve?
implement vectorized evaluation for builtinDurationDurationTimeDiffSig, for #12176
What is changed and how it works?
Check List
Tests