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 builtinCurrentRoleSig #13352

Merged
merged 4 commits into from
Nov 11, 2019

Conversation

shihongzhi
Copy link
Member

What problem does this PR solve?

implement vectorized evaluation for builtinCurrentRoleSig , for #12106

What is changed and how it works?

$go test -v -benchmem -bench=BenchmarkVectorizedBuiltinInfoFunc -run=BenchmarkVectorizedBuiltinInfoFunc -args "builtinCurrentRoleSig"
goos: darwin
goarch: amd64
pkg: github.com/pingcap/tidb/expression
BenchmarkVectorizedBuiltinInfoFunc/builtinCurrentRoleSig-VecBuiltinFunc-4         	   81760	     15292 ns/op	     192 B/op	       2 allocs/op
BenchmarkVectorizedBuiltinInfoFunc/builtinCurrentRoleSig-NonVecBuiltinFunc-4      	   79507	     14121 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/pingcap/tidb/expression	2.812s

Tests

  • Unit test

@sre-bot sre-bot added the contribution This PR is from a community contributor. label Nov 11, 2019
@shihongzhi shihongzhi marked this pull request as ready for review November 11, 2019 07:43
@shihongzhi shihongzhi requested a review from a team as a code owner November 11, 2019 07:43
@ghost ghost requested review from qw4990 and SunRunAway and removed request for a team November 11, 2019 07:43
@codecov
Copy link

codecov bot commented Nov 11, 2019

Codecov Report

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

@@             Coverage Diff             @@
##             master     #13352   +/-   ##
===========================================
  Coverage   80.1859%   80.1859%           
===========================================
  Files           469        469           
  Lines        112526     112526           
===========================================
  Hits          90230      90230           
  Misses        15308      15308           
  Partials       6988       6988

Comment on lines 135 to 140
for i, r := range sortedRes {
res += r
if i != len(data.ActiveRoles)-1 {
res += ","
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these code equal to strings.Join?

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

Copy link
Contributor

@Reminiscent Reminiscent left a comment

Choose a reason for hiding this comment

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

LGTM

@Reminiscent Reminiscent added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. labels Nov 11, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Nov 11, 2019

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Nov 11, 2019

@shihongzhi merge failed.

@qw4990
Copy link
Contributor

qw4990 commented Nov 11, 2019

�/rebuild

@qw4990 qw4990 merged commit ceb31ef into pingcap:master Nov 11, 2019
XiaTianliang pushed a commit to XiaTianliang/tidb that referenced this pull request Dec 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression contribution This PR is from a community contributor. 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.

5 participants