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

*: optimize SortExec #4622

Merged
merged 6 commits into from Sep 25, 2017

Conversation

Projects
None yet
6 participants
@zz-jason
Member

zz-jason commented Sep 25, 2017

  1. for struct orderByRow defined in file executor/sort.go, change key []types.Datum to key []*types.Datum
  2. for function Datum.CompareDatum() defined in util/types/datum.go, change the function signature from CompareDatum(sc *variable.StatementContext, ad Datum) to CompareDatum(sc *variable.StatementContext, ad *Datum)
num records old sorter new sorter efficiency improved
10 1769ns 1662ns 6.44%
100 28884ns 22490ns 28.43%
1000 295691ns 225859ns 30.92%
10000 3424773ns 2700828ns 26.80%
@shenli

This comment has been minimized.

Show comment
Hide comment
@shenli

shenli Sep 25, 2017

Member

Good job!

Member

shenli commented Sep 25, 2017

Good job!

@zz-jason

This comment has been minimized.

Show comment
Hide comment
@zz-jason

zz-jason Sep 25, 2017

Member

/run-all-test

Member

zz-jason commented Sep 25, 2017

/run-all-test

@XuHuaiyu

LGTM

@winoros winoros added status/LGT2 and removed status/LGT1 labels Sep 25, 2017

@coocood coocood merged commit 6f84392 into master Sep 25, 2017

5 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls First build on master at 72.717%
Details
jenkins-ci-tidb/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@coocood coocood deleted the zz-jason/executor/sort/optimize branch Sep 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment