Skip to content
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 builtinTimestamp1ArgSig #12339

Merged
merged 11 commits into from
Sep 25, 2019

Conversation

Reminiscent
Copy link
Contributor

@Reminiscent Reminiscent commented Sep 24, 2019

What problem does this PR solve?

implement vectorized evaluation for builtinTimestamp1ArgSig
To: #12101

What is changed and how it works?

BenchmarkVectorizedBuiltinTimeFunc/builtinTimestamp1ArgSig-VecBuiltinFunc-4                 2416            498074 ns/op          147457 B/op       7168 allocs/op
BenchmarkVectorizedBuiltinTimeFunc/builtinTimestamp1ArgSig-NonVecBuiltinFunc-4              2119            585147 ns/op          147456 B/op       7168 allocs/op
BenchmarkVectorizedBuiltinTimeFunc/builtinTimestamp1ArgSig-VecBuiltinFunc#01-4              2797            436687 ns/op          147456 B/op       7168 allocs/op
BenchmarkVectorizedBuiltinTimeFunc/builtinTimestamp1ArgSig-NonVecBuiltinFunc#01-4           2124            542507 ns/op          147456 B/op       7168 allocs/op
BenchmarkVectorizedBuiltinTimeFunc/builtinTimestamp1ArgSig-VecBuiltinFunc#02-4               337           3399349 ns/op          569341 B/op      16130 allocs/op
BenchmarkVectorizedBuiltinTimeFunc/builtinTimestamp1ArgSig-NonVecBuiltinFunc#02-4            252           4736968 ns/op          569340 B/op      16130 allocs/op
BenchmarkVectorizedBuiltinTimeFunc/builtinTimestamp1ArgSig-VecBuiltinFunc#03-4               318           3641208 ns/op          475200 B/op      10725 allocs/op
BenchmarkVectorizedBuiltinTimeFunc/builtinTimestamp1ArgSig-NonVecBuiltinFunc#03-4            235           4978121 ns/op          475200 B/op      10725 allocs/op

Check List

Tests

  • Unit test

@codecov
Copy link

codecov bot commented Sep 24, 2019

Codecov Report

Merging #12339 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #12339   +/-   ##
===========================================
  Coverage   80.8854%   80.8854%           
===========================================
  Files           454        454           
  Lines         99971      99971           
===========================================
  Hits          80862      80862           
  Misses        13323      13323           
  Partials       5786       5786

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason
Copy link
Member

The performance is really poor compared with other builtin functions 😂

@zz-jason zz-jason added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 24, 2019
if err = handleInvalidTimeError(b.ctx, err); err != nil {
return err
}
result.SetNull(i, true)
Copy link
Contributor

Choose a reason for hiding this comment

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

How about add an error rate option in generator to cover this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update. PTAL @SunRunAway

Copy link
Contributor

@SunRunAway SunRunAway left a comment

Choose a reason for hiding this comment

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

LGTM

@SunRunAway SunRunAway added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 25, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Sep 25, 2019

/run-all-tests

@sre-bot sre-bot merged commit fb07e86 into pingcap:master Sep 25, 2019
@Reminiscent Reminiscent deleted the builtinTimestamp1ArgSig branch December 24, 2019 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants