expression: implement vectorized evaluation for builtinLog10Sig#12012
Merged
sre-bot merged 6 commits intopingcap:masterfrom Sep 4, 2019
Merged
expression: implement vectorized evaluation for builtinLog10Sig#12012sre-bot merged 6 commits intopingcap:masterfrom
builtinLog10Sig#12012sre-bot merged 6 commits intopingcap:masterfrom
Conversation
Contributor
Author
|
/run-all-tests |
Contributor
Author
|
/run-unit-test |
Codecov Report
@@ Coverage Diff @@
## master #12012 +/- ##
===========================================
Coverage 81.3707% 81.3707%
===========================================
Files 446 446
Lines 95597 95597
===========================================
Hits 77788 77788
Misses 12284 12284
Partials 5525 5525 |
zz-jason
reviewed
Sep 3, 2019
expression/builtin_math_vec.go
Outdated
| @@ -0,0 +1,46 @@ | |||
| // Copyright 2013 The ql Authors. All rights reserved. | |||
Member
There was a problem hiding this comment.
Suggested change
| // Copyright 2013 The ql Authors. All rights reserved. | |
| // Copyright 2019 The ql Authors. All rights reserved. |
Contributor
There was a problem hiding this comment.
Unnecessary to state ql license here?
Contributor
Author
There was a problem hiding this comment.
Yes, it's my mistake.
It's updated now.
| } | ||
| f64s := result.Float64s() | ||
| for i := 0; i < len(f64s); i++ { | ||
| if result.IsNull(i) { |
Member
There was a problem hiding this comment.
would it be faster if we don't check null here?
Contributor
Author
There was a problem hiding this comment.
After testing, this way is slightly faster.
I think the reason is that math.Log10 is relatively heavy to SetNull, so it's better to check nulls here.
Contributor
|
/run-all-tests |
Member
|
to #12058 |
48 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Implement vectorized evaluation for
builtinLog10SigWhat is changed and how it works?
Here is the benchmark, almost 2.5x fater than before:
Check List
Tests