Repository navigation
[Experiment] Split native deflate hash allocation on Win64 - #134853
Closed
alinpahontu2912 wants to merge 1 commit into
Closed
alinpahontu2912 wants to merge 1 commit into
alinpahontu2912 wants to merge 1 commit into
Conversation
Allocate the hash-head table separately while preserving window adjacency, alignment, allocation-failure cleanup, and copy semantics. Document the vendored change. This experiment improves warm throughput but does not fix the measured cold-start regression. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d488efd3-0804-456f-9286-2129a5cf5c6e
|
Azure Pipelines: Successfully started running 4 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @karelz, @dotnet/area-system-io-compression |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Experimental native-only alternative
Draft for discussion, not merge-ready: this change improves warm parallel compression in local measurements but makes the cold workload slower. It is not a demonstrated fix for the first-operation regression in #134700.
This is a separate, native-only experiment related to #134700 and the managed-pooling experiment in #134790. It is based on upstream main at 9499094 and contains none of the managed pooling changes. PR #134790 is unchanged.
Change
On
_WIN64, allocate zlib-ng's 128 KiB hash-head table separately from the consolidated deflate state:deflateCopypath.The patch adds no pool, retained-state policy, managed changes, public API, or native export. The motivation is to test smaller allocation blocks while preserving the dedicated Windows heap. A specific Windows decommit threshold has not been established.
Correctness validation
Local Windows x64 Release validation:
The contract harness is an experimental validation artifact, not a new checked-in regression test.
_WIN64also includes Windows ARM64; ARM64 was not built or executed locally.Performance: benefit and blocker
The reproduction uses #134700's seeded 5,000-byte, half-random payload. Control and candidate run in separate private CoreRun hosts with identical runtime and unpooled managed compression binaries; only
System.IO.Compression.Native.dlldiffers. Output hashes and timed output-byte totals matched.These are native-patch before/after measurements, not a direct comparison between .NET 8 and .NET 10.
Three fresh-process samples per condition. Cold runs measure 3,000 operations; warm runs measure 20,000 operations after warm-up. Median elapsed time:
Four additional alternating-order DOP-8 pairs confirmed the tradeoff:
Shared-host noise was retained in the results. Cold page faults per operation increased; warm faults decreased. Warm improvement therefore does not establish that this addresses the original cold/first-operation regression.
No further allocator variants or additional policy machinery are proposed here. This draft preserves the small experiment and its negative result for discussion; it does not propose replacing the managed-pooling PR or claim to resolve #134700.
Note
This patch, validation summary, and PR description were prepared with GitHub Copilot.