Repository navigation
Conversation
mahach666
force-pushed
the
feature/issue-22-las-exporter
branch
from
November 17, 2026 15:02
d93b040 to
4e9bf94
Compare
mahach666
force-pushed
the
feature/issue-23-zstd-performance
branch
from
November 17, 2026 15:02
c03a024 to
a0245c9
Compare
This branch has not been deployed
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.
Closes #23
Based on #73 (the branch
feature/issue-22-las-exporter); merge the earlier pull requests first.What changed
paths without unsafe code and without weakening any check:
independent bit readers overlap in the processor;
PeekMasked);Refillis marked no-inline so the hotPeek/Readstay small enough to inline; hot fields are hoisted to localsand
CopyMatchcarries an inline hint.ZstdBenchmarkTestsdecodes ~102 MiB of concatenated reference frames, asserts the output, andprints our MB/s next to a reference decoder (the managed C# port
ZstdSharp.Port, test-only dependency, MIT).showed no win and would weaken the rule that memory is only obtained for data a block is about to produce.
Files changed
src/PclIO/Internal/ZstdHuffman.cs:DecodeInterleaved, mask hoisting.src/PclIO/Internal/ZstdBitReaders.cs:PeekMasked, no-inlineRefill.src/PclIO/Internal/ZstdDecoder.cs: interleaved call site, hoisted locals, inline hint.tests/PclIO.Tests/ZstdBenchmarkTests.cs: new benchmark (correctness-asserted, timing only reported).tests/PclIO.Tests/PclIO.Tests.csproj,Directory.Packages.props: test-onlyZstdSharp.Port0.8.8 (exact pin).tests/PclIO.Tests/ZstdDecoderTests.cs:ContentOfshared with the benchmark.THIRD-PARTY-NOTICES.md,CHANGELOG.md: the new test dependency and the change.Tests
dotnet build— 0 warnings, 0 errors.dotnet test(Debug and Release) — 687 passed, 0 failed, 10 skipped (the tests that need private scan files) on.NET 8 and .NET 10, including all existing Zstandard vector, fuzz and damaged-input tests.
before: ours ~61 ms (~1660 MiB/s out), reference ~31 ms (~3250 MiB/s out) — about 2x;
after: ours ~52 ms (~1950 MiB/s out), reference ~31 ms — about 1.7x.
Limits
(bounds-checked table loads, sequential bit dependencies), and going further would need unsafe code, which the issue
rules out. A dotnet-trace profile during the work showed sequence execution ~64% and Huffman decode ~10% of decode time.
machine-specific — the test asserts only correctness, never a time, so it stays green everywhere.
to produce.