-
Notifications
You must be signed in to change notification settings - Fork 18k
compress/flate: simplify sorting in huffman_code #66816
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
base: master
Are you sure you want to change the base?
Conversation
This PR (HEAD: 1070520) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/578437. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from qiulaidongfeng: Patch Set 1: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Go LUCI: Patch Set 1: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-04-14T11:30:52Z","revision":"2abd5f2b4bb2540aad16b99f7f8cb23d1e8edad1"} Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from qiulaidongfeng: Patch Set 1: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Go LUCI: Patch Set 1: 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/578437. |
Message from Go LUCI: Patch Set 1: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Ian Lance Taylor: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Zhen Li: Patch Set 1: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
This PR (HEAD: 95d3868) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/578437. Important tips:
|
Message from Zhen Li: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Zhen Li: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Ian Lance Taylor: Patch Set 2: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Go LUCI: Patch Set 2: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-12-28T17:52:21Z","revision":"bc67492c4f2a0a17007eb885e41c38604f87bb8e"} Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Ian Lance Taylor: Patch Set 2: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Go LUCI: Patch Set 2: This CL has failed the run. Reason: Tryjob golang/try/gotip-linux-amd64-boringcrypto has failed with summary (view all results):
Build or test failure, click here for results. To reproduce, try Additional links for debugging: Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Go LUCI: Patch Set 2: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Ian Lance Taylor: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Zhen Li: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
This PR (HEAD: ed9d734) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/578437. Important tips:
|
Message from t hepudds: Patch Set 3: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Go LUCI: Patch Set 3: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-12-30T03:01:56Z","revision":"e49256f3704bd13ac5320ab0d654c86764c961f2"} Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from t hepudds: Patch Set 3: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Go LUCI: Patch Set 3: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Go LUCI: Patch Set 3: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Ian Lance Taylor: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Replace custom sort implementations with slices.SortFunc and cmp.Compare for clarity and simplicity. This change removes the previously defined byLiteral and byFreq types and their associated methods, leveraging the standard library's generic functions to achieve the same functionality. The update makes use of "slices" and "cmp" packages for sorting, streamlining the codebase and improving readability.
This PR (HEAD: 71b73c9) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/578437. Important tips:
|
Message from Zhen Li: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from t hepudds: Patch Set 4: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Go LUCI: Patch Set 4: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-12-31T02:43:47Z","revision":"df25fbbc4887e755ac5ebb2701e814e33862b708"} Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from t hepudds: Patch Set 4: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Go LUCI: Patch Set 4: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Go LUCI: Patch Set 4: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Ian Lance Taylor: Patch Set 4: Auto-Submit+1 Code-Review+2 Commit-Queue+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Go LUCI: Patch Set 4: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2025-01-01T02:01:57Z","revision":"df25fbbc4887e755ac5ebb2701e814e33862b708"} Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Ian Lance Taylor: Patch Set 4: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Go LUCI: Patch Set 4: This CL has failed the run. Reason: Tryjob golang/try/gotip-linux-amd64 has failed with summary (view all results):
Build or test failure, click here for results. To reproduce, try Additional links for debugging: Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Message from Go LUCI: Patch Set 4: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/578437. |
Replace custom sort implementations with slices.SortFunc and
cmp.Compare for clarity and simplicity. This change removes
the previously defined byLiteral and byFreq types and their
associated methods, leveraging the standard library's generic
functions to achieve the same functionality.
The update makes use of "slices" and "cmp" packages for sorting,
streamlining the codebase and improving readability.