-
Notifications
You must be signed in to change notification settings - Fork 17.3k
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
internal/zstd: optimize window reset using make for buffer allocation #64221
Conversation
This PR (HEAD: aca6717) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/543375. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from qiulaidongfeng: Patch Set 1: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Gopher Robot: Patch Set 1: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Aimuz me: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Ingo Oeser: Patch Set 1: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Aimuz me: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
This PR (HEAD: 8cde50e) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/543375. Important tips:
|
Message from Aimuz me: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Jorropo: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Aimuz me: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Ingo Oeser: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Aimuz me: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Aimuz me: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
This PR (HEAD: 2a13fed) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/543375. Important tips:
|
Message from Jorropo: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Aimuz me: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
This PR (HEAD: 3221685) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/543375. Important tips:
|
Message from Jorropo: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Aimuz me: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from qiulaidongfeng: Patch Set 4: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Gopher Robot: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Gopher Robot: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Gopher Robot: Patch Set 4: TryBot-Result-1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Aimuz me: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from qiulaidongfeng: Patch Set 5: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Gopher Robot: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Gopher Robot: Patch Set 5: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Ian Lance Taylor: Patch Set 5: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
This PR (HEAD: f2b1223) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/543375. Important tips:
|
Message from Zhen Li: Patch Set 5: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Ian Lance Taylor: Patch Set 6: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Go LUCI: Patch Set 6: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-03-04T14:01:58Z","revision":"3c8b3d6cea992017a3ac00a981efd6d44d1af75b"} Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Ian Lance Taylor: Patch Set 6: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Go LUCI: Patch Set 6: This CL has failed the run. Reason: Tryjob golang/try/x_tools-gotip-linux-amd64 has failed with summary (view all results): FAILURE
Error: Links: Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Go LUCI: Patch Set 6: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Optimize the zstd window's reset function to use `make` for buffer allocation when needed. This ensures efficient memory usage by conditionally reallocating the buffer based on its capacity, improving performance in scenarios where the existing buffer is insufficient.
This PR (HEAD: c00344c) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/543375. Important tips:
|
Message from qiulaidongfeng: Patch Set 8: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Go LUCI: Patch Set 8: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-03-05T12:41:52Z","revision":"5587853420a83d085cdaf1404ff47ebe3d68c8c9"} Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from qiulaidongfeng: Patch Set 8: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Go LUCI: Patch Set 8: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Go LUCI: Patch Set 8: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from qiulaidongfeng: Patch Set 8: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Ian Lance Taylor: Patch Set 8: Auto-Submit+1 Code-Review+2 Commit-Queue+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Go LUCI: Patch Set 8: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-04-01T17:59:59Z","revision":"5587853420a83d085cdaf1404ff47ebe3d68c8c9"} Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Ian Lance Taylor: Patch Set 8: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Message from Go LUCI: Patch Set 8: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/543375. |
Optimize the zstd window's reset function to use `make` for buffer allocation when needed. This ensures efficient memory usage by conditionally reallocating the buffer based on its capacity, improving performance in scenarios where the existing buffer is insufficient. ``` goos: darwin goarch: amd64 pkg: internal/zstd cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz │ old.out │ new.out │ │ sec/op │ sec/op vs base │ Large-12 7.299m ± 5% 7.235m ± 1% ~ (p=0.353 n=10) │ old.out │ new.out │ │ B/s │ B/s vs base │ Large-12 35.56Mi ± 4% 35.87Mi ± 1% ~ (p=0.353 n=10) │ old.out │ new.out │ │ B/op │ B/op vs base │ Large-12 68.86Ki ± 4% 15.87Ki ± 1% -76.95% (p=0.000 n=10) │ old.out │ new.out │ │ allocs/op │ allocs/op vs base │ Large-12 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ ¹ all samples are equal ``` Change-Id: Icd9c278b42ea149107a9861d006f40129c59831b GitHub-Last-Rev: c00344c GitHub-Pull-Request: #64221 Reviewed-on: https://go-review.googlesource.com/c/go/+/543375 Reviewed-by: qiulaidongfeng <2645477756@qq.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
This PR is being closed because golang.org/cl/543375 has been merged. |
Optimize the zstd window's reset function to use
make
for bufferallocation when needed. This ensures efficient memory usage by
conditionally reallocating the buffer based on its capacity, improving
performance in scenarios where the existing buffer is insufficient.