-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
migrate string functions to inovke_with_args
#14722
Conversation
cc: @goldmedal |
54f5be7
to
3a24290
Compare
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.
Thanks @zjregee. I left some comments for the benchmark. The other parts look great.
criterion::black_box( | ||
concat() | ||
.invoke_with_args(ScalarFunctionArgs { | ||
args: args.clone(), |
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.
Maybe we can move clone
out of black_box
. It can decrease the impact of clone
for the benchmark result. (It's more close to the previous version.)
criterion::black_box( | |
concat() | |
.invoke_with_args(ScalarFunctionArgs { | |
args: args.clone(), | |
let args_cloned = args.clone(); | |
criterion::black_box( | |
concat() | |
.invoke_with_args(ScalarFunctionArgs { | |
args: args_cloned, |
In my laptop, if we place clone
in the black_box,
the result will slow down by about 5%.
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 think other benchmark cases can be improved by moving out the clone()
.
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.
Thanks for your suggestion, I have optimized this in the submission.
3751730
to
942c3a8
Compare
942c3a8
to
b19ae17
Compare
And I noticed that #14686 introduced a call |
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.
Thanks @zjregee. It looks great 👍
🚀 |
Which issue does this PR close?
inovke_with_args
#14708.Rationale for this change
What changes are included in this PR?
Deprecate and remove
invoke_batch
in string functions and migrate to providinginvoke_with_args
.Are these changes tested?
Yes.
Are there any user-facing changes?
None.