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

chunk: [experimental] new wide chunk in prealloc way #7967

Closed
wants to merge 13 commits into from
Closed

chunk: [experimental] new wide chunk in prealloc way #7967

wants to merge 13 commits into from

Conversation

lysu
Copy link
Contributor

@lysu lysu commented Oct 19, 2018

What problem does this PR solve?

experimental new wide chunk in prealloc way, inspired by #7916

pprof wide table query under dead loop will find newFixedColumn and its make([]T, y, z) will be called many times and use many time, and it's also let GC into bad

xxx

What is changed and how it works?

so this PR want to deduce newFixedColumn and makeslice by prealloc a pre-calucated memory arena, then direct use them if column number is big.

WIP for run-all-tests and real-world's performance.

Check List

Tests

  • This PR just want run-all-tests and find any thing breaks

add bench two way to New 45 columns chunk.

pkg: github.com/pingcap/tidb/util/chunk
BenchmarkNormalNewWideChunk-8   	  300000	      4290 ns/op	    6192 B/op	     137 allocs/op
BenchmarkFastNewWideChunk-8     	 1000000	      1847 ns/op	    6576 B/op	       5 allocs/op
PASS

Code changes

  • Impl

Side effects

  • No

Related changes

  • No need to merge, just experimental

This change is Reviewable

@iamxy
Copy link
Member

iamxy commented Oct 21, 2018

/run-all-tests

@iamxy
Copy link
Member

iamxy commented Oct 21, 2018

It seems that CI has failed. Please confirm.
Thx.

@lysu
Copy link
Contributor Author

lysu commented Oct 23, 2018

/run-all-tests

@lysu lysu closed this Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants