rustgzip 0.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rustgzip-0.5.2/.cargo/config.toml +5 -0
- rustgzip-0.5.2/ARCHITECTURE-BOTTLENECK-AUDIT.md +301 -0
- rustgzip-0.5.2/Cargo.lock +42 -0
- rustgzip-0.5.2/Cargo.toml +42 -0
- rustgzip-0.5.2/ELF-AUDIT.txt +79 -0
- rustgzip-0.5.2/LICENSE +21 -0
- rustgzip-0.5.2/MANIFEST.in +16 -0
- rustgzip-0.5.2/OPTIMIZATION-030.md +82 -0
- rustgzip-0.5.2/OPTIMIZATION-050.md +119 -0
- rustgzip-0.5.2/PARALLEL-040.md +146 -0
- rustgzip-0.5.2/PKG-INFO +351 -0
- rustgzip-0.5.2/PROVENANCE.md +43 -0
- rustgzip-0.5.2/README.md +343 -0
- rustgzip-0.5.2/RELEASE-052.md +9 -0
- rustgzip-0.5.2/REVIEW-031.md +57 -0
- rustgzip-0.5.2/REVIEW-051.md +90 -0
- rustgzip-0.5.2/STAGED-FIRSTPASS-REPORT.md +92 -0
- rustgzip-0.5.2/SYMBOL-KERNEL-PROTOTYPE-REPORT.md +147 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/cfg-if-LICENSE-APACHE +201 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/cfg-if-LICENSE-MIT +25 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/crc32fast-LICENSE-APACHE +202 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/crc32fast-LICENSE-MIT +21 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/flate2-LICENSE-APACHE +201 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/flate2-LICENSE-MIT +25 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-linux/COPYRIGHT-library.html +29357 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-linux/licenses/Apache-2.0.txt +73 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-linux/licenses/BSD-2-Clause.txt +9 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-linux/licenses/CC-BY-SA-4.0.txt +427 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-linux/licenses/GCC-exception-3.1.txt +30 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-linux/licenses/GPL-2.0-only.txt +133 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-linux/licenses/GPL-3.0-or-later.txt +202 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-linux/licenses/ISC.txt +7 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-linux/licenses/LLVM-exception.txt +15 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-linux/licenses/MIT.txt +9 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-linux/licenses/NCSA.txt +29 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-linux/licenses/OFL-1.1.txt +43 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-linux/licenses/Unicode-3.0.txt +39 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-windows-COPYRIGHT-library.html +29357 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-windows-licenses/Apache-2.0.txt +73 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-windows-licenses/BSD-2-Clause.txt +9 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-windows-licenses/CC-BY-SA-4.0.txt +427 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-windows-licenses/GCC-exception-3.1.txt +30 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-windows-licenses/GPL-2.0-only.txt +133 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-windows-licenses/GPL-3.0-or-later.txt +202 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-windows-licenses/ISC.txt +7 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-windows-licenses/LLVM-exception.txt +15 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-windows-licenses/MIT.txt +9 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-windows-licenses/NCSA.txt +29 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-windows-licenses/OFL-1.1.txt +43 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/rust-windows-licenses/Unicode-3.0.txt +39 -0
- rustgzip-0.5.2/THIRD_PARTY_LICENSES/zlib-rs-LICENSE +19 -0
- rustgzip-0.5.2/TWO-STAGE-POSTPROCESS-REPORT.md +82 -0
- rustgzip-0.5.2/UPSTREAM-REVIEW.md +96 -0
- rustgzip-0.5.2/benchmark-linux-py34.json +124 -0
- rustgzip-0.5.2/benchmark-windows.json +124 -0
- rustgzip-0.5.2/buffer-sweep-linux.json +347 -0
- rustgzip-0.5.2/buffer-sweep-windows.json +347 -0
- rustgzip-0.5.2/compare-linux-010.json +252 -0
- rustgzip-0.5.2/compare-linux-020-fresh.json +300 -0
- rustgzip-0.5.2/compare-linux-020.json +300 -0
- rustgzip-0.5.2/compare-linux-030-final.json +302 -0
- rustgzip-0.5.2/compare-windows-010.json +252 -0
- rustgzip-0.5.2/compare-windows-020-fresh.json +300 -0
- rustgzip-0.5.2/compare-windows-020.json +300 -0
- rustgzip-0.5.2/compare-windows-030-final.json +300 -0
- rustgzip-0.5.2/members-linux-020.json +75 -0
- rustgzip-0.5.2/members-linux-030.json +77 -0
- rustgzip-0.5.2/members-windows-020.json +75 -0
- rustgzip-0.5.2/members-windows-030.json +75 -0
- rustgzip-0.5.2/memory-051-comparison.json +126 -0
- rustgzip-0.5.2/optimization-030-comparison.json +146 -0
- rustgzip-0.5.2/optimization-comparison.json +186 -0
- rustgzip-0.5.2/parallel-050-linux-py34.json +359 -0
- rustgzip-0.5.2/parallel-050-windows.json +359 -0
- rustgzip-0.5.2/parallel-linux-py34.json +976 -0
- rustgzip-0.5.2/parallel-windows.json +991 -0
- rustgzip-0.5.2/pyproject.toml +8 -0
- rustgzip-0.5.2/python/rustgzip/__init__.py +385 -0
- rustgzip-0.5.2/python/rustgzip/experimental.py +283 -0
- rustgzip-0.5.2/setup.py +47 -0
- rustgzip-0.5.2/src/decompress_parallel/bit_cursor.rs +149 -0
- rustgzip-0.5.2/src/decompress_parallel/block_finder.rs +343 -0
- rustgzip-0.5.2/src/decompress_parallel/block_finder_tests.rs +423 -0
- rustgzip-0.5.2/src/decompress_parallel/diagnostics.rs +42 -0
- rustgzip-0.5.2/src/decompress_parallel/domino.rs +329 -0
- rustgzip-0.5.2/src/decompress_parallel/domino_tests.rs +618 -0
- rustgzip-0.5.2/src/decompress_parallel/file_pool.rs +2441 -0
- rustgzip-0.5.2/src/decompress_parallel/file_pool_handoff_tests.rs +1443 -0
- rustgzip-0.5.2/src/decompress_parallel/file_pool_tests.rs +450 -0
- rustgzip-0.5.2/src/decompress_parallel/file_verify.rs +891 -0
- rustgzip-0.5.2/src/decompress_parallel/file_verify_tests.rs +593 -0
- rustgzip-0.5.2/src/decompress_parallel/framing.rs +174 -0
- rustgzip-0.5.2/src/decompress_parallel/huffman.rs +352 -0
- rustgzip-0.5.2/src/decompress_parallel/huffman_fast_tests.rs +110 -0
- rustgzip-0.5.2/src/decompress_parallel/input.rs +469 -0
- rustgzip-0.5.2/src/decompress_parallel/input_tests.rs +465 -0
- rustgzip-0.5.2/src/decompress_parallel/known_window.rs +174 -0
- rustgzip-0.5.2/src/decompress_parallel/mod.rs +72 -0
- rustgzip-0.5.2/src/decompress_parallel/native_window.rs +648 -0
- rustgzip-0.5.2/src/decompress_parallel/native_window_tests.rs +761 -0
- rustgzip-0.5.2/src/decompress_parallel/output.rs +218 -0
- rustgzip-0.5.2/src/decompress_parallel/output_tests.rs +261 -0
- rustgzip-0.5.2/src/decompress_parallel/postprocess.rs +420 -0
- rustgzip-0.5.2/src/decompress_parallel/postprocess_tests.rs +458 -0
- rustgzip-0.5.2/src/decompress_parallel/scheduler.rs +734 -0
- rustgzip-0.5.2/src/decompress_parallel/scheduler_tests.rs +436 -0
- rustgzip-0.5.2/src/decompress_parallel/speculative.rs +556 -0
- rustgzip-0.5.2/src/decompress_parallel/speculative_tests.rs +850 -0
- rustgzip-0.5.2/src/decompress_parallel/staged.rs +617 -0
- rustgzip-0.5.2/src/decompress_parallel/staged_tests.rs +448 -0
- rustgzip-0.5.2/src/decompress_parallel/streaming.rs +606 -0
- rustgzip-0.5.2/src/decompress_parallel/streaming_tests.rs +695 -0
- rustgzip-0.5.2/src/decompress_parallel/symbol_kernel.rs +279 -0
- rustgzip-0.5.2/src/decompress_parallel/symbol_kernel_tests.rs +499 -0
- rustgzip-0.5.2/src/decompress_parallel/tests.rs +386 -0
- rustgzip-0.5.2/src/lib.rs +598 -0
- rustgzip-0.5.2/src/memory.rs +131 -0
- rustgzip-0.5.2/src/parallel.rs +373 -0
- rustgzip-0.5.2/tests/fixtures/README.md +62 -0
- rustgzip-0.5.2/tests/fixtures/deflate-foundation.tsv +8 -0
- rustgzip-0.5.2/tests/fixtures/deflate-symbolic.tsv +10 -0
- rustgzip-0.5.2/tests/fixtures/gzip-chain.tsv +6 -0
- rustgzip-0.5.2/tests/fixtures/large-dynamic.gz +0 -0
- rustgzip-0.5.2/tests/test_api.py +672 -0
- rustgzip-0.5.2/tests/test_experimental.py +367 -0
- rustgzip-0.5.2/tests/test_packaging.py +133 -0
- rustgzip-0.5.2/tests-experimental-linux-py34.log +35 -0
- rustgzip-0.5.2/tests-experimental-linux-py37.log +35 -0
- rustgzip-0.5.2/tests-experimental-windows.log +35 -0
- rustgzip-0.5.2/tests-linux-py34.log +90 -0
- rustgzip-0.5.2/tests-linux-py37.log +90 -0
- rustgzip-0.5.2/tests-packaging.log +15 -0
- rustgzip-0.5.2/tests-windows.log +90 -0
- rustgzip-0.5.2/tools/analyze_worker_timeline.py +63 -0
- rustgzip-0.5.2/tools/audit_parallel_architecture.py +51 -0
- rustgzip-0.5.2/tools/audit_preindexed_native.py +25 -0
- rustgzip-0.5.2/tools/bench_handoff_scope.py +53 -0
- rustgzip-0.5.2/tools/bench_history_reuse.py +68 -0
- rustgzip-0.5.2/tools/bench_native_output.py +72 -0
- rustgzip-0.5.2/tools/bench_regression_diagnosis.py +104 -0
- rustgzip-0.5.2/tools/bench_staged.py +65 -0
- rustgzip-0.5.2/tools/bench_structural.py +50 -0
- rustgzip-0.5.2/tools/bench_symbol_kernel.py +71 -0
- rustgzip-0.5.2/tools/bench_two_stage.py +72 -0
- rustgzip-0.5.2/tools/bench_worker_handoff.py +260 -0
- rustgzip-0.5.2/tools/benchmark.py +73 -0
- rustgzip-0.5.2/tools/benchmark_affinity.py +70 -0
- rustgzip-0.5.2/tools/benchmark_members.py +60 -0
- rustgzip-0.5.2/tools/bootstrap_linux.sh +11 -0
- rustgzip-0.5.2/tools/bootstrap_py34.sh +10 -0
- rustgzip-0.5.2/tools/build_linux.sh +8 -0
- rustgzip-0.5.2/tools/check_deflate_foundation.py +100 -0
- rustgzip-0.5.2/tools/check_deflate_symbolic.py +86 -0
- rustgzip-0.5.2/tools/check_gzip_chain.py +92 -0
- rustgzip-0.5.2/tools/check_parallel_pool.py +70 -0
- rustgzip-0.5.2/tools/check_peak_memory.py +39 -0
- rustgzip-0.5.2/tools/check_release.py +81 -0
- rustgzip-0.5.2/tools/compare_parallel_releases.py +102 -0
- rustgzip-0.5.2/tools/compare_versions.py +91 -0
- rustgzip-0.5.2/tools/experiment_parallel.py +158 -0
- rustgzip-0.5.2/tools/package_release.py +148 -0
- rustgzip-0.5.2/tools/tune_buffers.py +34 -0
- rustgzip-0.5.2/tools/update_030_report.py +68 -0
- rustgzip-0.5.2/vendor/cfg-if/.cargo-checksum.json +1 -0
- rustgzip-0.5.2/vendor/cfg-if/.cargo_vcs_info.json +6 -0
- rustgzip-0.5.2/vendor/cfg-if/.github/dependabot.yml +14 -0
- rustgzip-0.5.2/vendor/cfg-if/.github/workflows/main.yaml +48 -0
- rustgzip-0.5.2/vendor/cfg-if/.github/workflows/publish.yaml +25 -0
- rustgzip-0.5.2/vendor/cfg-if/CHANGELOG.md +33 -0
- rustgzip-0.5.2/vendor/cfg-if/Cargo.lock +16 -0
- rustgzip-0.5.2/vendor/cfg-if/Cargo.toml +47 -0
- rustgzip-0.5.2/vendor/cfg-if/Cargo.toml.orig +20 -0
- rustgzip-0.5.2/vendor/cfg-if/LICENSE-APACHE +201 -0
- rustgzip-0.5.2/vendor/cfg-if/LICENSE-MIT +25 -0
- rustgzip-0.5.2/vendor/cfg-if/README.md +61 -0
- rustgzip-0.5.2/vendor/cfg-if/src/lib.rs +218 -0
- rustgzip-0.5.2/vendor/cfg-if/tests/xcrate.rs +16 -0
- rustgzip-0.5.2/vendor/crc32fast/.cargo-checksum.json +1 -0
- rustgzip-0.5.2/vendor/crc32fast/.cargo_vcs_info.json +6 -0
- rustgzip-0.5.2/vendor/crc32fast/.github/workflows/ci.yml +128 -0
- rustgzip-0.5.2/vendor/crc32fast/Cargo.lock +185 -0
- rustgzip-0.5.2/vendor/crc32fast/Cargo.toml +72 -0
- rustgzip-0.5.2/vendor/crc32fast/Cargo.toml.orig +32 -0
- rustgzip-0.5.2/vendor/crc32fast/LICENSE-APACHE +202 -0
- rustgzip-0.5.2/vendor/crc32fast/LICENSE-MIT +21 -0
- rustgzip-0.5.2/vendor/crc32fast/README.md +95 -0
- rustgzip-0.5.2/vendor/crc32fast/benches/bench.rs +161 -0
- rustgzip-0.5.2/vendor/crc32fast/build.rs +35 -0
- rustgzip-0.5.2/vendor/crc32fast/src/baseline.rs +111 -0
- rustgzip-0.5.2/vendor/crc32fast/src/combine.rs +55 -0
- rustgzip-0.5.2/vendor/crc32fast/src/lib.rs +217 -0
- rustgzip-0.5.2/vendor/crc32fast/src/specialized/aarch64.rs +198 -0
- rustgzip-0.5.2/vendor/crc32fast/src/specialized/mod.rs +36 -0
- rustgzip-0.5.2/vendor/crc32fast/src/specialized/pclmulqdq.rs +522 -0
- rustgzip-0.5.2/vendor/crc32fast/src/table.rs +629 -0
- rustgzip-0.5.2/vendor/crc32fast/tests/exhaustive.rs +160 -0
- rustgzip-0.5.2/vendor/flate2/.cargo-checksum.json +1 -0
- rustgzip-0.5.2/vendor/flate2/.cargo_vcs_info.json +6 -0
- rustgzip-0.5.2/vendor/flate2/Cargo.lock +335 -0
- rustgzip-0.5.2/vendor/flate2/Cargo.toml +264 -0
- rustgzip-0.5.2/vendor/flate2/Cargo.toml.orig +127 -0
- rustgzip-0.5.2/vendor/flate2/LICENSE-APACHE +201 -0
- rustgzip-0.5.2/vendor/flate2/LICENSE-MIT +25 -0
- rustgzip-0.5.2/vendor/flate2/MAINTENANCE.md +28 -0
- rustgzip-0.5.2/vendor/flate2/README.md +132 -0
- rustgzip-0.5.2/vendor/flate2/examples/compress_file.rs +26 -0
- rustgzip-0.5.2/vendor/flate2/examples/decompress_file.rs +23 -0
- rustgzip-0.5.2/vendor/flate2/examples/deflatedecoder-bufread.rs +22 -0
- rustgzip-0.5.2/vendor/flate2/examples/deflatedecoder-read.rs +22 -0
- rustgzip-0.5.2/vendor/flate2/examples/deflatedecoder-write.rs +24 -0
- rustgzip-0.5.2/vendor/flate2/examples/deflateencoder-bufread.rs +22 -0
- rustgzip-0.5.2/vendor/flate2/examples/deflateencoder-read.rs +18 -0
- rustgzip-0.5.2/vendor/flate2/examples/deflateencoder-write.rs +10 -0
- rustgzip-0.5.2/vendor/flate2/examples/gzbuilder.rs +22 -0
- rustgzip-0.5.2/vendor/flate2/examples/gzdecoder-bufread.rs +21 -0
- rustgzip-0.5.2/vendor/flate2/examples/gzdecoder-read.rs +21 -0
- rustgzip-0.5.2/vendor/flate2/examples/gzdecoder-write.rs +24 -0
- rustgzip-0.5.2/vendor/flate2/examples/gzencoder-bufread.rs +22 -0
- rustgzip-0.5.2/vendor/flate2/examples/gzencoder-read.rs +18 -0
- rustgzip-0.5.2/vendor/flate2/examples/gzencoder-write.rs +10 -0
- rustgzip-0.5.2/vendor/flate2/examples/gzmultidecoder-bufread.rs +22 -0
- rustgzip-0.5.2/vendor/flate2/examples/gzmultidecoder-read.rs +22 -0
- rustgzip-0.5.2/vendor/flate2/examples/hello_world.txt +1 -0
- rustgzip-0.5.2/vendor/flate2/examples/hello_world.txt.gz +0 -0
- rustgzip-0.5.2/vendor/flate2/examples/zlibdecoder-bufread.rs +22 -0
- rustgzip-0.5.2/vendor/flate2/examples/zlibdecoder-read.rs +22 -0
- rustgzip-0.5.2/vendor/flate2/examples/zlibdecoder-write.rs +24 -0
- rustgzip-0.5.2/vendor/flate2/examples/zlibencoder-bufread.rs +22 -0
- rustgzip-0.5.2/vendor/flate2/examples/zlibencoder-read.rs +19 -0
- rustgzip-0.5.2/vendor/flate2/examples/zlibencoder-write.rs +10 -0
- rustgzip-0.5.2/vendor/flate2/src/bufreader.rs +106 -0
- rustgzip-0.5.2/vendor/flate2/src/crc.rs +325 -0
- rustgzip-0.5.2/vendor/flate2/src/deflate/bufread.rs +304 -0
- rustgzip-0.5.2/vendor/flate2/src/deflate/mod.rs +205 -0
- rustgzip-0.5.2/vendor/flate2/src/deflate/read.rs +254 -0
- rustgzip-0.5.2/vendor/flate2/src/deflate/write.rs +387 -0
- rustgzip-0.5.2/vendor/flate2/src/ffi/c.rs +484 -0
- rustgzip-0.5.2/vendor/flate2/src/ffi/miniz_oxide.rs +206 -0
- rustgzip-0.5.2/vendor/flate2/src/ffi/mod.rs +88 -0
- rustgzip-0.5.2/vendor/flate2/src/ffi/zlib_rs.rs +253 -0
- rustgzip-0.5.2/vendor/flate2/src/gz/bufread.rs +562 -0
- rustgzip-0.5.2/vendor/flate2/src/gz/mod.rs +828 -0
- rustgzip-0.5.2/vendor/flate2/src/gz/read.rs +454 -0
- rustgzip-0.5.2/vendor/flate2/src/gz/write.rs +683 -0
- rustgzip-0.5.2/vendor/flate2/src/lib.rs +280 -0
- rustgzip-0.5.2/vendor/flate2/src/mem.rs +828 -0
- rustgzip-0.5.2/vendor/flate2/src/zio.rs +302 -0
- rustgzip-0.5.2/vendor/flate2/src/zlib/bufread.rs +312 -0
- rustgzip-0.5.2/vendor/flate2/src/zlib/mod.rs +175 -0
- rustgzip-0.5.2/vendor/flate2/src/zlib/read.rs +288 -0
- rustgzip-0.5.2/vendor/flate2/src/zlib/write.rs +406 -0
- rustgzip-0.5.2/vendor/flate2/tests/capabilities.rs +240 -0
- rustgzip-0.5.2/vendor/flate2/tests/early-flush.rs +18 -0
- rustgzip-0.5.2/vendor/flate2/tests/empty-read.rs +80 -0
- rustgzip-0.5.2/vendor/flate2/tests/good-file.gz +0 -0
- rustgzip-0.5.2/vendor/flate2/tests/good-file.txt +733 -0
- rustgzip-0.5.2/vendor/flate2/tests/gunzip.rs +85 -0
- rustgzip-0.5.2/vendor/flate2/tests/multi.gz +0 -0
- rustgzip-0.5.2/vendor/flate2/tests/multi.txt +2 -0
- rustgzip-0.5.2/vendor/flate2/tests/zero-write.rs +120 -0
- rustgzip-0.5.2/vendor/zlib-rs/.cargo-checksum.json +1 -0
- rustgzip-0.5.2/vendor/zlib-rs/.cargo_vcs_info.json +6 -0
- rustgzip-0.5.2/vendor/zlib-rs/Cargo.lock +148 -0
- rustgzip-0.5.2/vendor/zlib-rs/Cargo.toml +74 -0
- rustgzip-0.5.2/vendor/zlib-rs/Cargo.toml.orig +40 -0
- rustgzip-0.5.2/vendor/zlib-rs/LICENSE +19 -0
- rustgzip-0.5.2/vendor/zlib-rs/README.md +29 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/adler32/avx2.rs +203 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/adler32/avx512.rs +274 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/adler32/avx512_vnni.rs +225 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/adler32/generic.rs +116 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/adler32/lsx.rs +279 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/adler32/neon.rs +290 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/adler32/wasm.rs +158 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/adler32.rs +149 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/allocate.rs +606 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/c_api.rs +261 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/cpu_features.rs +120 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/crc32/acle.rs +247 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/crc32/braid.rs +223 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/crc32/combine.rs +115 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/crc32/loongarch.rs +155 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/crc32/pclmulqdq.rs +361 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/crc32/vpclmulqdq.rs +136 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/crc32.rs +258 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/deflate/algorithm/fast.rs +114 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/deflate/algorithm/huff.rs +46 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/deflate/algorithm/medium.rs +331 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/deflate/algorithm/mod.rs +82 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/deflate/algorithm/quick.rs +157 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/deflate/algorithm/rle.rs +84 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/deflate/algorithm/slow.rs +161 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/deflate/algorithm/stored.rs +292 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/deflate/compare256.rs +470 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/deflate/hash_calc.rs +167 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/deflate/longest_match.rs +350 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/deflate/pending.rs +101 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/deflate/slide_hash.rs +208 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/deflate/sym_buf.rs +83 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/deflate/test-data/inflate_buf_error.dat +0 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/deflate/test-data/paper-100k.pdf +600 -2
- rustgzip-0.5.2/vendor/zlib-rs/src/deflate/trees_tbl.rs +161 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/deflate/window.rs +51 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/deflate.rs +4331 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/inflate/bitreader.rs +208 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/inflate/infback.rs +963 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/inflate/inffixed_tbl.rs +555 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/inflate/inftrees.rs +339 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/inflate/window.rs +307 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/inflate/writer.rs +535 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/inflate.rs +2734 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/lib.rs +285 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/stable.rs +426 -0
- rustgzip-0.5.2/vendor/zlib-rs/src/weak_slice.rs +95 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
# 普通 gzip 并行解压架构审计
|
|
2
|
+
|
|
3
|
+
审计日期:2026-10-21。目标是解释为什么局部优化多次有效,普通日志仍无法超过
|
|
4
|
+
顺序基线,而不是继续添加微优化开关。本轮没有修改生产解码算法、依赖或 Python
|
|
5
|
+
API,只增加开发测量工具和一个 test-only 的已知检查点诊断模式。
|
|
6
|
+
|
|
7
|
+
## 结论
|
|
8
|
+
|
|
9
|
+
目前的系统有两个相互牵制的瓶颈:
|
|
10
|
+
|
|
11
|
+
1. 完整推测解码可以提前做较多工作,但符号解码器的每字节成本高,协调器还
|
|
12
|
+
顺序回填整片符号和计算 CRC,四个 worker 补不回这些额外成本。
|
|
13
|
+
2. 通过 256 KiB 未知前缀提前交付和协调器原生接续,避开了大量慢符号工作,
|
|
14
|
+
却把日志约 89.7% 明文的原生解码放回一条串行链。其单 worker 与四 worker
|
|
15
|
+
吞吐几乎相同。后来的缓冲、快照和通知优化主要在缩减这条串行链的附加成本。
|
|
16
|
+
|
|
17
|
+
因此,“退回完整推测”与“更早切原生”单独做都不够。要大幅改变扩展性,需要
|
|
18
|
+
让未知历史片段在真实前驱尚未完成时也能**高效地完成第一阶段**,并把串行职责
|
|
19
|
+
缩到末尾窗口传播,而不是让协调器继续承担整片解码和整片回填。
|
|
20
|
+
|
|
21
|
+
这是当前输入和代码证据支持的架构判断;不是所有 gzip 文件的普遍下界。
|
|
22
|
+
|
|
23
|
+
## 1. 本轮如何交叉验证
|
|
24
|
+
|
|
25
|
+
第一轮:核对本地任务、预算、交付和提交代码,回看已有时间线。
|
|
26
|
+
第二轮:查阅原始 rapidgzip 论文,重点核对两阶段、窗口传播和停止规则。
|
|
27
|
+
第三轮:查阅 rapidgzip 当前关联源码与独立 Rust 实现的公开审计,区别算法结构
|
|
28
|
+
和单机 SIMD/汇编优化;随后做本地三路径反事实测试。
|
|
29
|
+
第四轮:新增提前准备真实检查点的独立原生任务对照,区分后端潜力与首次解压
|
|
30
|
+
的字典发现成本。其准备成本明确不计入计时,不能当产品速度。
|
|
31
|
+
|
|
32
|
+
本机处理器读取得到 Intel Core Ultra 9 275HX、24 核/24 逻辑处理器。它包含
|
|
33
|
+
性能核和能效核:[Intel 官方规格](https://www.intel.com/content/www/us/en/products/sku/242293/intel-core-ultra-9-processor-275hx-36m-cache-up-to-5-40-ghz/specifications.html)。
|
|
34
|
+
已有测量只固定协调/计时线程 CPU 0,worker 仍由系统调度,没有逐 worker 核型、
|
|
35
|
+
频率、温度或 PMU 采样。因此百分之几的波动不能直接解释成某个缓存或分支因素。
|
|
36
|
+
线程占用区间也不等于 CPU 使用时间。
|
|
37
|
+
这里的“4 worker”另有一个协调线程,不是全进程总共四个线程;同理“1 worker”
|
|
38
|
+
也不能自动解释为仅用一个核心。所有核心吞吐来自 Rust 测量入口,Python 工具
|
|
39
|
+
只启动进程和收集结果;本次扩展问题在未经过 Python 解码接口时已出现,不能
|
|
40
|
+
归因于 Python 3.4 或 GIL。
|
|
41
|
+
|
|
42
|
+
## 2. 目前真正运行的任务图
|
|
43
|
+
|
|
44
|
+
```mermaid
|
|
45
|
+
flowchart TD
|
|
46
|
+
A[压缩位网格与候选搜索] --> B[未知历史 worker]
|
|
47
|
+
B --> C{窗口中的 Marker 是否消失}
|
|
48
|
+
C -->|消失| D[原生后缀独立解码]
|
|
49
|
+
C -->|持续存在| E[约 256 KiB 后在完整块边界提前交付]
|
|
50
|
+
E --> F[协调器等待可信前驱并验证窗口]
|
|
51
|
+
F --> G[协调器原生顺序接续大片数据]
|
|
52
|
+
D --> H[协调器按顺序提交]
|
|
53
|
+
G --> H
|
|
54
|
+
H --> I[符号回填 / CRC / 输出事务]
|
|
55
|
+
I --> J[下一片真实历史]
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
候选从压缩区间内的合法块头开始,原生后端仍严格要求真实窗口。`history-feedback`
|
|
59
|
+
只能把精确起点的字典发给尚未结束的任务;本次日志四 worker 样本 applied=0,
|
|
60
|
+
不能把“反馈机制存在”当作它已经打通并发交接的证据。
|
|
61
|
+
|
|
62
|
+
需要核对的本地位置:
|
|
63
|
+
|
|
64
|
+
- `src/decompress_parallel/file_pool.rs` 的 `decode_task_with_history`:原生选择、
|
|
65
|
+
256 KiB 提前交付、压缩网格终点与输出预算。
|
|
66
|
+
- 同文件 `Pool::lookup`:只在精确起点匹配时采用候选;可信任务拿到历史后才建立。
|
|
67
|
+
`direct_known` 启动后,后继通常返回协调器直接执行。
|
|
68
|
+
- `src/decompress_parallel/file_verify.rs`:`validated_tail` 只解析候选末尾窗口,
|
|
69
|
+
但之后的批次循环仍调用 `FileChunk::read` 回填整片符号,并顺序计算 CRC。
|
|
70
|
+
- `FileLease::Drop`:结果被完整消费后才释放其槽位和内存信用,没有独立的
|
|
71
|
+
“窗口已传播但全文后处理尚未完成”的任务状态。
|
|
72
|
+
|
|
73
|
+
精确起点、历史验证、失败回滚与内存信用都是需要保留的正确性约束。性能重构
|
|
74
|
+
应改变工作分配和对象生命周期,不能删掉这些约束。
|
|
75
|
+
|
|
76
|
+
## 3. 本轮反事实测试:三个策略为何都不理想
|
|
77
|
+
|
|
78
|
+
[原始五轮数据](architecture-audit-128m.json),128 MiB 热缓存,交错执行,取中位数。
|
|
79
|
+
计时包含线程启动/回收,不含进程启动/编译;同源码构建三个 release 程序。
|
|
80
|
+
2 MiB 压缩网格、4 MiB 单任务输出额度、64 KiB 批次、最多 128 块/任务。
|
|
81
|
+
|
|
82
|
+
- full_symbolic:实际 feature 为 `history-feedback`,取消提前交付,继续推测。
|
|
83
|
+
这个标签不是说全文件都用符号;已知历史或已消除 Marker 的部分仍用原生。
|
|
84
|
+
- yield_then_worker:`unknown-prefix-yield`,交付前缀后用携带真实历史的 worker 接续。
|
|
85
|
+
- current:`lazy-native-history quiet-idle-workers`,主要由协调器原生接续。
|
|
86
|
+
|
|
87
|
+
单位 MiB/s:
|
|
88
|
+
|
|
89
|
+
| 输入与策略 | 1 worker | 2 worker | 4 worker | 1→4 扩展 |
|
|
90
|
+
|---|---:|---:|---:|---:|
|
|
91
|
+
| 日志,完整推测 | 209.49 | 342.37 | 380.52 | 1.82 倍 |
|
|
92
|
+
| 日志,前缀交付后派发可信任务 | 434.58 | 533.99 | 484.03 | 1.11 倍 |
|
|
93
|
+
| 日志,当前协调器接续 | 693.82 | 590.13 | 701.02 | 1.01 倍 |
|
|
94
|
+
| 随机 Base64,完整推测 | 303.15 | 572.03 | 840.03 | 2.77 倍 |
|
|
95
|
+
| 随机 Base64,前缀交付后派发可信任务 | 319.46 | 552.07 | 801.99 | 2.51 倍 |
|
|
96
|
+
| 随机 Base64,当前协调器接续 | 324.69 | 576.40 | 865.97 | 2.67 倍 |
|
|
97
|
+
|
|
98
|
+
同轮顺序基线:日志 819.86、随机 474.76 MiB/s。
|
|
99
|
+
不建池、仍走块级验证层的 native-only:日志 728.75、随机 329.55 MiB/s。
|
|
100
|
+
后者不是理想后端裸吞吐:它仍有逐块处理、窗口、状态检查、CRC 和提交开销,
|
|
101
|
+
诊断用 Direct 来源也会请求历史。它与顺序 Decoder 的差距不能全归咎于某一项。
|
|
102
|
+
|
|
103
|
+
### 3.1 当前路径的并行主体很小
|
|
104
|
+
|
|
105
|
+
当前日志四 worker 的一条普通计时样本,明文总量 134217728 字节:
|
|
106
|
+
|
|
107
|
+
| 工作类别 | 字节数 | 占总明文 |
|
|
108
|
+
|---|---:|---:|
|
|
109
|
+
| 协调器原生解码 | 120330356 | 89.65% |
|
|
110
|
+
| 被采用的 worker 原生输出 | 8994615 | 6.70% |
|
|
111
|
+
| 被采用的 worker 符号输出 | 4892757 | 3.65% |
|
|
112
|
+
|
|
113
|
+
worker 合计只完成约 10.35% 有效明文。原生处理总占比约 96.35%,但绝大部分
|
|
114
|
+
在协调器,不是四核原生并发。用“原生覆盖率高”证明多核扩展,指标选错了。
|
|
115
|
+
|
|
116
|
+
原先 yield_then_worker 的 worker 原生量达 120743133 字节,却依赖前序窗口逐个
|
|
117
|
+
接续。把串行任务从协调器搬到 worker,并不会让它们自动独立。
|
|
118
|
+
|
|
119
|
+
### 3.2 时间线与字节归属相互印证
|
|
120
|
+
|
|
121
|
+
[单独计时诊断与时间线摘要](architecture-audit-timeline-summary.json);诊断开时钟
|
|
122
|
+
和 trace,不能替代上表普通测量,也不能把不同线程累计墙钟直接相加。
|
|
123
|
+
|
|
124
|
+
日志 current 诊断:总墙钟约 178.72 ms,协调器批次解码约 144.20 ms,
|
|
125
|
+
等待约 17.48 ms,CRC 约 3.49 ms。worker 平均任务占用约 0.58 个,不是 CPU
|
|
126
|
+
核利用率;最后一个 worker 在约 99.54 ms 完成,后面还有约 79 ms 主要由
|
|
127
|
+
协调器继续推进。不是四个 worker 一直在有效解码。
|
|
128
|
+
|
|
129
|
+
日志 full_symbolic:总墙钟约 314.56 ms,worker 符号阶段累计约 480.88 ms,
|
|
130
|
+
协调器批次解码/符号回填约 82.71 ms,CRC 约 7.14 ms。
|
|
131
|
+
这说明完整推测确实把工作分给更多 worker,但符号处理和串行全文回填成本高。
|
|
132
|
+
|
|
133
|
+
随机 current:worker 平均任务占用约 3.42 个、四 worker 约 866 MiB/s,
|
|
134
|
+
与“同一个池可以并行,只是日志任务失去了独立性”的判断一致。
|
|
135
|
+
|
|
136
|
+
### 3.3 候选失败和重复解码不是本样本的主因
|
|
137
|
+
|
|
138
|
+
日志四 worker 三组的候选重试均为 0,拒绝历史为 0;约 115 万个搜索 bit
|
|
139
|
+
位置,说明搜索有成本,但没有大量假候选失败。完整推测组未采用/重复量约
|
|
140
|
+
0.98 MB,current 约 0.073 MB,相比 128 MiB 总量很小。
|
|
141
|
+
扫描累计约 45–51 ms,分布在 worker 上且与解码重叠,不能当作总墙钟占比。
|
|
142
|
+
本轮证据不支持优先继续优化假候选剪枝或声称“重复解码吞掉大半时间”。
|
|
143
|
+
|
|
144
|
+
日志组块内重放 attempts=0;持续 Marker 阻止窗口变成真实字节。进一步改进
|
|
145
|
+
仅在窗口已知时才能启动的块内重放,无法直接覆盖这条日志主路径。
|
|
146
|
+
|
|
147
|
+
### 3.4 提前提供真实字典后的原生扩展对照
|
|
148
|
+
|
|
149
|
+
`tools/audit_preindexed_native.py` 增加了一个 test-only 诊断:先完整验证单 member
|
|
150
|
+
并收集约 2 MiB 压缩间隔处的真实块起点和字典,然后**在准备完成后重新计时**,
|
|
151
|
+
独立任务使用原生后端解码、计算局部 CRC,末尾按顺序合并 CRC、长度和块数,
|
|
152
|
+
与前一遍已验证结果核对。创建/回收线程、计时内输入读取和 CRC 均包含。
|
|
153
|
+
|
|
154
|
+
它排除了候选搜索、第一次构造字典和符号中间结果,也不保留全量明文;单任务
|
|
155
|
+
可以连续读完整个已知区间,不受旧的 4 MiB 结果缓存限制。因此这是定位工具,
|
|
156
|
+
不是当前调度器只需一个开关就能达到的成绩,更不是无索引首次解压成绩。
|
|
157
|
+
|
|
158
|
+
字典准备虽不计时,但实际执行且有开销;不能省略它再向用户报“普通 gzip
|
|
159
|
+
已经达到数 GB/s”。两组都是热缓存。普通测量记录中的线程 cycles 探针包围了
|
|
160
|
+
准备过程,不能用该值解释 oracle 的纯计时段 CPU 成本。
|
|
161
|
+
|
|
162
|
+
最终数据见 [已知检查点诊断](architecture-preindexed-diagnostic.json)。
|
|
163
|
+
固定源码五轮中位数,单位 MiB/s:
|
|
164
|
+
|
|
165
|
+
| 输入 | 同轮顺序基线 | 已知索引 1 worker | 2 worker | 4 worker |
|
|
166
|
+
|---|---:|---:|---:|---:|
|
|
167
|
+
| 日志 | 907.40 | 919.89 | 1579.86 | 2772.19 |
|
|
168
|
+
| 随机 Base64 | 467.03 | 478.79 | 882.44 | 1522.11 |
|
|
169
|
+
|
|
170
|
+
日志有 16 个真实字典任务,随机有 49 个;原生任务 1→4 分别约扩展 3.01 倍、
|
|
171
|
+
3.18 倍,验证 CRC、长度和块数一致。它证明后端和当前机器能执行有效的独立
|
|
172
|
+
原生并行任务,但没有证明无索引时能够低成本获得这些字典,也没有证明保留
|
|
173
|
+
全量 bytes 输出时仍有相同数字。不同表的顺序基线各自同轮,不能跨表相减
|
|
174
|
+
推导某一个具体步骤耗时。
|
|
175
|
+
|
|
176
|
+
本轮三路径测量完成后,仅追加了这个诊断 helper 及默认构建的 feature guard;
|
|
177
|
+
生产解码文件不变。两个阶段分别记录其当时源码摘要,不能声称所有 JSON 的
|
|
178
|
+
测试文件摘要完全一致。
|
|
179
|
+
|
|
180
|
+
## 4. 为什么完整符号路径成本高
|
|
181
|
+
|
|
182
|
+
这些是源码中确认存在的操作,还没有 PMU/函数级采样证实各自 CPU 占比,
|
|
183
|
+
不能随意排出精确百分比:
|
|
184
|
+
|
|
185
|
+
1. `FileBits::transaction` 在每个 literal/match token 周围建立有界 BitCursor,
|
|
186
|
+
检查输入、取消、逻辑范围、重试条件和提交位置。它是可靠的恢复型解析器,
|
|
187
|
+
但尚不是“缓存输入上的连续快速 inflate 循环 + 少量尾部慢路径”。
|
|
188
|
+
2. `BitCursor::peek_bits` 对所需位逐字节拼接,没有持续的宽位缓存。Huffman
|
|
189
|
+
主表默认 8 位,长码逐位回退。扩大主表单独做过,但不能替代整个 token 循环设计。
|
|
190
|
+
3. LZ77 匹配先写输出 Vec,又维护一份 32 KiB u16 环形历史;`SymbolWindow::extend`
|
|
191
|
+
统计被覆盖的旧 Marker 和进入的新 Marker,再复制。批量复制已实现,但每批
|
|
192
|
+
仍有两份符号存储的流量和依赖统计,不是单纯将 u8 换成 u16。
|
|
193
|
+
4. 每批新建符号 Vec;本地 batch、任务总 symbols、窗口之间仍有搬运。回填时
|
|
194
|
+
又分配真实字节批次,全文由协调器遍历。CRC 另读一次真实输出。
|
|
195
|
+
|
|
196
|
+
不能笼统地说“纯 Rust 必然慢”或“u16 必然无法批量/SIMD”。应先隔离基于输出
|
|
197
|
+
历史的连续符号内核,测每 token 指令成本、match 长度和 Marker 分布,再决定
|
|
198
|
+
宽加载、表布局或 SIMD。安全尾部、重叠复制和 Marker 传播语义必须保留。
|
|
199
|
+
|
|
200
|
+
## 5. 必须纠正的 32 KiB 前提
|
|
201
|
+
|
|
202
|
+
最大直接回溯距离是 32 KiB,不意味着解出 32 KiB 后未知引用消失。一个尚未
|
|
203
|
+
确定的字节,可以被 distance=1 的重复匹配一直传播;解出几 MiB 后尾窗口仍
|
|
204
|
+
全是它的 Marker。代码使用 unknown_count==0 的判断是必要的。
|
|
205
|
+
|
|
206
|
+
因此,阶段 6 的原生交接在随机数据很有价值,但不能作为日志的普遍解决方案。
|
|
207
|
+
“前 0.2% 慢解析,后 99.8% 一定原生”这个估算没有普适性。更宽松的交接条件
|
|
208
|
+
若不能证明所需真实字典已知,会把性能问题变成正确性问题。
|
|
209
|
+
|
|
210
|
+
[RFC 1951](https://www.rfc-editor.org/info/rfc1951/) 规定跨块回溯及距离上限;
|
|
211
|
+
它没有保证历史内容的依赖经过一个窗口后必然消失。
|
|
212
|
+
|
|
213
|
+
## 6. 与公开实现的根本差异
|
|
214
|
+
|
|
215
|
+
[rapidgzip 原始论文 §2.2、§3.3](https://arxiv.org/html/2308.08955v1) 的关键结构是:
|
|
216
|
+
先做未知历史解码,再传播片尾窗口,全文 Marker 替换可并行;窗口全真实时才
|
|
217
|
+
退回普通解码。串行依赖是窗口传播,不应扩大为大片实际解码。
|
|
218
|
+
|
|
219
|
+
进一步核对当前 rapidgzip 所引用的 librapidarchive 固定提交
|
|
220
|
+
`1221a30bb548b305a69e5715f2bc348ba37ac243`:
|
|
221
|
+
[GzipChunkFetcher](https://github.com/mxmlnkn/indexed_bzip2/blob/1221a30bb548b305a69e5715f2bc348ba37ac243/src/rapidgzip/GzipChunkFetcher.hpp)
|
|
222
|
+
的 `queueChunkForPostProcessing` 先建立下一个窗口,再提交 `applyWindow` 任务;
|
|
223
|
+
[ChunkData](https://github.com/mxmlnkn/indexed_bzip2/blob/1221a30bb548b305a69e5715f2bc348ba37ac243/src/rapidgzip/ChunkData.hpp)
|
|
224
|
+
在真实数据就绪后处理局部 CRC。我们的文件提交路径目前仍逐批回填并顺序 CRC,
|
|
225
|
+
没有这个独立的并行后处理阶段。
|
|
226
|
+
|
|
227
|
+
另一个公开 Rust 实现的
|
|
228
|
+
[性能审计](https://github.com/COMBINE-lab/rapidgzip-rust/blob/main/PERFORMANCE_AUDIT.md)
|
|
229
|
+
也将输出作为符号历史、仅串行解析尾窗口、并行全文回填列为架构改动。
|
|
230
|
+
这是交叉验证方向,不能把其硬件成绩移植成我们的性能承诺,也不表示必须依赖
|
|
231
|
+
该项目;本轮没有复制它的实现代码。
|
|
232
|
+
|
|
233
|
+
## 7. 任务粒度和资源模型也需要重构
|
|
234
|
+
|
|
235
|
+
本轮日志压缩后约 30.04 MiB,膨胀比约 4.26;一个 2 MiB 压缩网格平均覆盖
|
|
236
|
+
约 8.52 MiB 明文,但任务总输出额度仅 4 MiB,再加最多 128 块的限制。
|
|
237
|
+
于是一个物理区间经常无法由一次任务覆盖;更激进的 256 KiB 提前交付使 worker
|
|
238
|
+
只留下约 0.3 MiB 符号,后继大片又回到可信链。这些额度分别保证了安全,却
|
|
239
|
+
没有共同围绕“可采用的独立片段”设计。
|
|
240
|
+
|
|
241
|
+
直接把额度翻倍并不等于解决:额度提高会使每槽预约内存同步提高,固定内存下
|
|
242
|
+
可并行槽位减少;若整片回填仍串行,增加工作粒度也可能只扩大尾延迟。
|
|
243
|
+
`occupied = queue + active + results + leased` 的信用生命周期目前绑定全文消费,
|
|
244
|
+
新架构需要明确窗口传播、全文后处理、顺序输出各自占哪些额度,不能靠增添一个
|
|
245
|
+
线程池后无界囤积缓冲或让后处理等待占满的槽位。
|
|
246
|
+
|
|
247
|
+
## 8. 测量和项目推进为何像在绕圈
|
|
248
|
+
|
|
249
|
+
- 多轮优化是在同一串行链上节约百分之几,不能改变可并行工作占比。
|
|
250
|
+
- 没有把“worker 实际采用字节”和“协调器解码字节”作为首要验收,原生覆盖率
|
|
251
|
+
和测试通过数容易掩盖任务图未变化。
|
|
252
|
+
- 稳定性测试证明正确性,不能证明吞吐;已有约 200 项测试不等于并行目标达标。
|
|
253
|
+
- 大部分新功能是默认关闭的 Rust 实验,公共 Python experimental 接口仍主要
|
|
254
|
+
是并行压缩/预取;没有把稳定的普通 gzip 内存/流式并行解压交付给 Python。
|
|
255
|
+
- 跨轮基线差异明显,混合核调度和系统状态未完整控制;不能将不同报告的提升
|
|
256
|
+
相加,更不应持续增加自动阈值来拟合两个自造样本。
|
|
257
|
+
|
|
258
|
+
本轮没有可靠 PMU 数据,尚不能确定具体缓存失效率、内存带宽利用率、逐函数
|
|
259
|
+
指令成本或 Windows metadata 系统调用占比。应保留这些为待测问题,不能把
|
|
260
|
+
“可能是内存带宽”作为已经找到的根因。
|
|
261
|
+
文件读取每次仍有前后 metadata 检查,块边界和提交层也保留稳定性检查;它们
|
|
262
|
+
属于下一步应计数/采样的外围成本,不能未经契约设计直接删掉。当前是 Discard
|
|
263
|
+
输出,尚未包含写盘、全量输出缓存和 Python 业务消费造成的背压。
|
|
264
|
+
|
|
265
|
+
## 9. 建议的后续实施顺序与停止条件
|
|
266
|
+
|
|
267
|
+
先冻结当前实验组合,保留现有原生顺序路径作为实用基线,再按以下顺序验证:
|
|
268
|
+
|
|
269
|
+
1. **独立符号内核原型。** 内存输入上连续解析多个 token,以任务输出为 LZ77
|
|
270
|
+
历史,按 match 保留额度检查,循环尾部处理补读/取消/错误。与当前符号路径
|
|
271
|
+
同输入差分,并分别测缓存输入与真实文件;未证明实质收益前不接入调度器。
|
|
272
|
+
2. **两阶段片段状态。** 明确 CandidateDecoded、WindowResolved、Materialized、
|
|
273
|
+
Committed;精确位起点和可信尾窗链继续验证,窗口传播不等待全文回填。
|
|
274
|
+
3. **有界并行后处理。** 取得真实前驱后,在共享有界池回填整个片段并算局部 CRC;
|
|
275
|
+
协调器只做尾窗传播、顺序 CRC 合并、member/framing 和最终输出事务。
|
|
276
|
+
局部 CRC 必须在 Marker 解析后计算,按 member 和真实长度合并。
|
|
277
|
+
4. **粒度与信用一起调整。** 用实际片段输出/压缩比安排额度和检查点,避免输出
|
|
278
|
+
上限在网格中间频繁结束;保留大块、空块链、压缩炸弹与取消的硬边界。
|
|
279
|
+
5. **固定验收矩阵。** 先控制同类物理核心,再测 Windows/UOS、公开日志/FASTQ/
|
|
280
|
+
二进制混合/随机/stored/重复输入,加入真实 bytes 输出而不仅是 Discard。
|
|
281
|
+
|
|
282
|
+
每次只允许一个结构性变量,记录有效片段覆盖、重复量、符号吞吐、尾窗传播耗时、
|
|
283
|
+
后处理耗时、协调器原生字节和峰值内存。不得以“平均任务占用”冒充硬件 CPU
|
|
284
|
+
利用率;不得将提前准备索引的成绩包装为首次普通 gzip 解压。
|
|
285
|
+
|
|
286
|
+
工具复现:
|
|
287
|
+
|
|
288
|
+
```powershell
|
|
289
|
+
$env:RUSTGZIP_BENCH_CPU = '0'
|
|
290
|
+
python tools/audit_parallel_architecture.py
|
|
291
|
+
python tools/audit_preindexed_native.py
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
第二个工具也会在每个测量进程内重新准备真实索引,但准备不计入报告的 seconds。
|
|
295
|
+
本轮最终默认 debug 170 项、全开关 debug/release 各 200 项通过,各有两项测量
|
|
296
|
+
默认跳过;严格 Clippy、格式检查和 Linux x86_64 tests 交叉检查通过。
|
|
297
|
+
两个诊断工具实际运行了多个 release 配置,不把未执行的 ignored 测试记成通过。
|
|
298
|
+
|
|
299
|
+
明确的通过标准应包括:在有足够可分块输入上,1→2→4 worker 有可重复扩展,
|
|
300
|
+
日志四 worker 超过同轮顺序基线,正确性/内存/关闭契约保持,且真实输出路径
|
|
301
|
+
仍有收益。达不到就停止向产品接口追加该方案,而不是再堆微优化阈值。
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "cfg-if"
|
|
7
|
+
version = "1.0.5"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "crc32fast"
|
|
13
|
+
version = "1.5.2"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "01a7799fd6b852db0e61728dde9a204c423b44d689dbd432522543614b490e78"
|
|
16
|
+
dependencies = [
|
|
17
|
+
"cfg-if",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[[package]]
|
|
21
|
+
name = "flate2"
|
|
22
|
+
version = "1.1.10"
|
|
23
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
24
|
+
checksum = "6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb"
|
|
25
|
+
dependencies = [
|
|
26
|
+
"crc32fast",
|
|
27
|
+
"zlib-rs",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[[package]]
|
|
31
|
+
name = "rustgzip"
|
|
32
|
+
version = "0.5.2"
|
|
33
|
+
dependencies = [
|
|
34
|
+
"flate2",
|
|
35
|
+
"zlib-rs",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[[package]]
|
|
39
|
+
name = "zlib-rs"
|
|
40
|
+
version = "0.6.8"
|
|
41
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
42
|
+
checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112"
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "rustgzip"
|
|
3
|
+
version = "0.5.2"
|
|
4
|
+
edition = "2021"
|
|
5
|
+
license = "MIT"
|
|
6
|
+
description = "Streaming gzip C ABI for Python 3.4 and newer"
|
|
7
|
+
|
|
8
|
+
[lib]
|
|
9
|
+
name = "rustgzip_native"
|
|
10
|
+
crate-type = ["cdylib"]
|
|
11
|
+
|
|
12
|
+
[dependencies]
|
|
13
|
+
flate2 = { version = "=1.1.10", default-features = false, features = ["zlib-rs", "runtime_detection"] }
|
|
14
|
+
zlib-rs = { version = "=0.6.8", default-features = false, features = ["std"] }
|
|
15
|
+
|
|
16
|
+
[features]
|
|
17
|
+
# 精确固定版本的底层恢复试验;默认不启用,不把 __internal-api 当作稳定接口承诺。
|
|
18
|
+
known-window-backend = ["zlib-rs/__internal-api"]
|
|
19
|
+
# 内部对照试验;统计构建有原子计数开销,不能用来报告正常吞吐。
|
|
20
|
+
huffman-profile = []
|
|
21
|
+
huffman-root9 = []
|
|
22
|
+
huffman-root10 = []
|
|
23
|
+
intrablock-handoff = ["known-window-backend"]
|
|
24
|
+
history-feedback = ["intrablock-handoff"]
|
|
25
|
+
# 在完整块边界交付有界未知前缀,后继仍由可信历史任务接续;默认关闭。
|
|
26
|
+
unknown-prefix-yield = ["history-feedback"]
|
|
27
|
+
direct-native-output = ["unknown-prefix-yield"]
|
|
28
|
+
spare-native-output = ["direct-native-output"]
|
|
29
|
+
# 协调器将已消费的真实历史缓冲用于下一块窗口快照,避免逐块分配/清零。
|
|
30
|
+
reuse-native-history = ["known-window-backend"]
|
|
31
|
+
# 连续原生块按需导出历史;需要候选验证/反馈时必须先取得真实窗口。
|
|
32
|
+
lazy-native-history = ["coordinator-native", "reuse-native-history"]
|
|
33
|
+
# 查询后没有排队任务时不广播唤醒空闲 worker;完成/关闭等通知不变。
|
|
34
|
+
quiet-idle-workers = ["coordinator-native"]
|
|
35
|
+
# 可信后继不派发串行依赖任务;协调器保留原生状态并推进,推测任务仍并行。
|
|
36
|
+
coordinator-native = ["unknown-prefix-yield"]
|
|
37
|
+
distance-bounded-handoff = ["intrablock-handoff"]
|
|
38
|
+
|
|
39
|
+
[profile.release]
|
|
40
|
+
lto = "thin"
|
|
41
|
+
codegen-units = 1
|
|
42
|
+
strip = "debuginfo"
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
|
|
2
|
+
Dynamic section at offset 0x82588 contains 30 entries:
|
|
3
|
+
Tag Type Name/Value
|
|
4
|
+
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
|
|
5
|
+
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
|
|
6
|
+
0x0000000000000001 (NEEDED) Shared library: [libdl.so.2]
|
|
7
|
+
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
|
|
8
|
+
0x0000000000000001 (NEEDED) Shared library: [ld-linux-x86-64.so.2]
|
|
9
|
+
0x000000000000001e (FLAGS) BIND_NOW
|
|
10
|
+
0x000000006ffffffb (FLAGS_1) Flags: NOW
|
|
11
|
+
0x0000000000000007 (RELA) 0x1170
|
|
12
|
+
0x0000000000000008 (RELASZ) 24120 (bytes)
|
|
13
|
+
0x0000000000000009 (RELAENT) 24 (bytes)
|
|
14
|
+
0x000000006ffffff9 (RELACOUNT) 937
|
|
15
|
+
0x0000000000000017 (JMPREL) 0x6fa8
|
|
16
|
+
0x0000000000000002 (PLTRELSZ) 120 (bytes)
|
|
17
|
+
0x0000000000000003 (PLTGOT) 0x85070
|
|
18
|
+
0x0000000000000014 (PLTREL) RELA
|
|
19
|
+
0x0000000000000006 (SYMTAB) 0x2d0
|
|
20
|
+
0x000000000000000b (SYMENT) 24 (bytes)
|
|
21
|
+
0x0000000000000005 (STRTAB) 0xc9c
|
|
22
|
+
0x000000000000000a (STRSZ) 1233 (bytes)
|
|
23
|
+
0x000000006ffffef5 (GNU_HASH) 0xc30
|
|
24
|
+
0x0000000000000019 (INIT_ARRAY) 0x801c8
|
|
25
|
+
0x000000000000001b (INIT_ARRAYSZ) 16 (bytes)
|
|
26
|
+
0x000000000000001a (FINI_ARRAY) 0x801c0
|
|
27
|
+
0x000000000000001c (FINI_ARRAYSZ) 8 (bytes)
|
|
28
|
+
0x000000000000000c (INIT) 0x2006c
|
|
29
|
+
0x000000000000000d (FINI) 0x20084
|
|
30
|
+
0x000000006ffffff0 (VERSYM) 0xa50
|
|
31
|
+
0x000000006ffffffe (VERNEED) 0xaf0
|
|
32
|
+
0x000000006fffffff (VERNEEDNUM) 5
|
|
33
|
+
0x0000000000000000 (NULL) 0x0
|
|
34
|
+
|
|
35
|
+
Version symbols section '.gnu.version' contains 80 entries:
|
|
36
|
+
Addr: 0000000000000a50 Offset: 0x000a50 Link: 2 (.dynsym)
|
|
37
|
+
000: 0 (*local*) 0 (*local*) 0 (*local*) 0 (*local*)
|
|
38
|
+
004: 2 (GLIBC_2.2.5) 3 (GLIBC_2.14) 2 (GLIBC_2.2.5) 4 (GCC_3.0)
|
|
39
|
+
008: 2 (GLIBC_2.2.5) 2 (GLIBC_2.2.5) 2 (GLIBC_2.2.5) 2 (GLIBC_2.2.5)
|
|
40
|
+
00c: 2 (GLIBC_2.2.5) 2 (GLIBC_2.2.5) 2 (GLIBC_2.2.5) 2 (GLIBC_2.2.5)
|
|
41
|
+
010: 4 (GCC_3.0) 4 (GCC_3.0) 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5)
|
|
42
|
+
014: 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5) 2 (GLIBC_2.2.5) 6 (GLIBC_2.3)
|
|
43
|
+
018: 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5) 2 (GLIBC_2.2.5) 2 (GLIBC_2.2.5)
|
|
44
|
+
01c: 5 (GLIBC_2.2.5) 0 (*local*) 4 (GCC_3.0) 4 (GCC_3.0)
|
|
45
|
+
020: 4 (GCC_3.0) 2 (GLIBC_2.2.5) 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5)
|
|
46
|
+
024: 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5) 2 (GLIBC_2.2.5) 5 (GLIBC_2.2.5)
|
|
47
|
+
028: 7 (GLIBC_2.2.5) 5 (GLIBC_2.2.5) 2 (GLIBC_2.2.5) 2 (GLIBC_2.2.5)
|
|
48
|
+
02c: 5 (GLIBC_2.2.5) 2 (GLIBC_2.2.5) 8 (GLIBC_2.3) 9 (GLIBC_2.28)
|
|
49
|
+
030: 2 (GLIBC_2.2.5) a (GLIBC_2.25) 2 (GLIBC_2.2.5) b (GLIBC_2.18)
|
|
50
|
+
034: 2 (GLIBC_2.2.5) c (GLIBC_2.12) d (GCC_3.3) 2 (GLIBC_2.2.5)
|
|
51
|
+
038: 5 (GLIBC_2.2.5) e (GLIBC_2.16) 2 (GLIBC_2.2.5) 5 (GLIBC_2.2.5)
|
|
52
|
+
03c: f (GLIBC_2.3.4) 4 (GCC_3.0) 10 (GCC_4.2.0) 4 (GCC_3.0)
|
|
53
|
+
040: 4 (GCC_3.0) 4 (GCC_3.0) 2 (GLIBC_2.2.5) 2 (GLIBC_2.2.5)
|
|
54
|
+
044: 1 (*global*) 1 (*global*) 1 (*global*) 1 (*global*)
|
|
55
|
+
048: 1 (*global*) 1 (*global*) 1 (*global*) 1 (*global*)
|
|
56
|
+
04c: 1 (*global*) 1 (*global*) 1 (*global*) 1 (*global*)
|
|
57
|
+
|
|
58
|
+
Version needs section '.gnu.version_r' contains 5 entries:
|
|
59
|
+
Addr: 0x0000000000000af0 Offset: 0x000af0 Link: 6 (.dynstr)
|
|
60
|
+
000000: Version: 1 File: libgcc_s.so.1 Cnt: 3
|
|
61
|
+
0x0050: Name: GCC_3.0 Flags: none Version: 4
|
|
62
|
+
0x0060: Name: GCC_3.3 Flags: none Version: 13
|
|
63
|
+
0x0070: Name: GCC_4.2.0 Flags: none Version: 16
|
|
64
|
+
0x0010: Version: 1 File: libpthread.so.0 Cnt: 2
|
|
65
|
+
0x0080: Name: GLIBC_2.2.5 Flags: none Version: 5
|
|
66
|
+
0x0090: Name: GLIBC_2.12 Flags: none Version: 12
|
|
67
|
+
0x0020: Version: 1 File: libdl.so.2 Cnt: 1
|
|
68
|
+
0x00a0: Name: GLIBC_2.2.5 Flags: none Version: 7
|
|
69
|
+
0x0030: Version: 1 File: libc.so.6 Cnt: 8
|
|
70
|
+
0x00b0: Name: GLIBC_2.2.5 Flags: none Version: 2
|
|
71
|
+
0x00c0: Name: GLIBC_2.3 Flags: none Version: 8
|
|
72
|
+
0x00d0: Name: GLIBC_2.3.4 Flags: none Version: 15
|
|
73
|
+
0x00e0: Name: GLIBC_2.14 Flags: none Version: 3
|
|
74
|
+
0x00f0: Name: GLIBC_2.16 Flags: none Version: 14
|
|
75
|
+
0x0100: Name: GLIBC_2.18 Flags: WEAK Version: 11
|
|
76
|
+
0x0110: Name: GLIBC_2.25 Flags: WEAK Version: 10
|
|
77
|
+
0x0120: Name: GLIBC_2.28 Flags: WEAK Version: 9
|
|
78
|
+
0x0040: Version: 1 File: ld-linux-x86-64.so.2 Cnt: 1
|
|
79
|
+
0x0130: Name: GLIBC_2.3 Flags: none Version: 6
|
rustgzip-0.5.2/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 rustgzip-uos contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
include Cargo.toml Cargo.lock LICENSE README.md PROVENANCE.md
|
|
2
|
+
recursive-include src *.rs
|
|
3
|
+
recursive-include tests *.py
|
|
4
|
+
recursive-include tools *.py
|
|
5
|
+
recursive-include THIRD_PARTY_LICENSES *
|
|
6
|
+
recursive-include vendor *
|
|
7
|
+
include .cargo/config.toml
|
|
8
|
+
include benchmark*.json tests*.log ELF-AUDIT.txt
|
|
9
|
+
include UPSTREAM-REVIEW.md compare-*.json optimization-comparison.json
|
|
10
|
+
include OPTIMIZATION-030.md buffer-sweep-*.json members-*.json optimization-030-comparison.json
|
|
11
|
+
include REVIEW-031.md
|
|
12
|
+
include PARALLEL-040.md parallel-*.json
|
|
13
|
+
include OPTIMIZATION-050.md
|
|
14
|
+
include REVIEW-051.md memory-051-comparison.json
|
|
15
|
+
include RELEASE-052.md STAGED-FIRSTPASS-REPORT.md TWO-STAGE-POSTPROCESS-REPORT.md
|
|
16
|
+
include SYMBOL-KERNEL-PROTOTYPE-REPORT.md ARCHITECTURE-BOTTLENECK-AUDIT.md
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# 0.3.0:继续搜索后的优化与验证
|
|
2
|
+
|
|
3
|
+
本轮目标是减少已有解码路径的额外工作,兼容 Python 3.4,继续完整验证 gzip。
|
|
4
|
+
新增封装独立编写,没有复制非公开代码,没有引入新的压缩算法或更改 gzip 格式。
|
|
5
|
+
|
|
6
|
+
## 1. 搜索结果与采用理由
|
|
7
|
+
|
|
8
|
+
- [flate2 Decompress API](https://docs.rs/flate2/1.1.10/flate2/struct.Decompress.html) 提供
|
|
9
|
+
gzip、未初始化输出及 Vec 剩余容量接口,可避免“临时缓冲 → 完整 Vec”的复制。
|
|
10
|
+
但查看锁定的 flate2 1.1.10 源码发现:其 zlib-rs 后端没有覆盖默认的
|
|
11
|
+
`decompress_uninit`,默认实现会先初始化整个输出区域。仅调用这个名字并不能获得预期收益。
|
|
12
|
+
- [zlib-rs](https://github.com/trifectatechfoundation/zlib-rs) 的公开 `Inflate::decompress_uninit`
|
|
13
|
+
真正支持未初始化目标。本包此前已经通过 flate2 使用 zlib-rs 0.6.8;现在将同一版本
|
|
14
|
+
增加为直接依赖,用于内存快路径,没有增加新的第三方代码或许可证种类。
|
|
15
|
+
- 同时核对 flate2 的 `crc.rs`,确认启用 zlib-rs 时本来就使用 zlib-rs 优化 CRC。
|
|
16
|
+
因此不能把“替换 CRC”当作已经实现的新加速。
|
|
17
|
+
- [libdeflate 官方说明](https://github.com/ebiggers/libdeflate#api) 明确主要支持整块缓冲,
|
|
18
|
+
不支持普通流式接口;不能直接替代我们的大文件 open/verify。保留为未来独立后端的候选。
|
|
19
|
+
- [zenflate 许可](https://github.com/imazen/zenflate#license) 是 AGPL/商业双许可。
|
|
20
|
+
本次没有集成它,不改变现有包的宽松许可依赖集合。
|
|
21
|
+
|
|
22
|
+
## 2. 已保留的改动
|
|
23
|
+
|
|
24
|
+
### 内存路径直接填充 Vec 剩余容量
|
|
25
|
+
|
|
26
|
+
新增 `src/memory.rs`。常见的无可选字段 gzip 头交给 zlib-rs gzip 模式,
|
|
27
|
+
CRC、ISIZE、DEFLATE 和结束状态仍由公开后端检查。用后端报告的已写入字节数扩展 Vec.len,
|
|
28
|
+
未写入的容量不返回 Python。所有指针/容量均继续配对释放。
|
|
29
|
+
|
|
30
|
+
遇到 FNAME、FCOMMENT、FEXTRA、FHCRC 或异常标志时,余下串接流转交原有 flate2 解析路径,
|
|
31
|
+
保留字段长度限制、保留位检查、头部 CRC 和错误行为。缓冲区尾部也不因回退而被清零。
|
|
32
|
+
|
|
33
|
+
当结果恰好填满 Vec 时,先用一个栈字节探测 EOF/CRC,不为了确认结束而先扩容整个结果。
|
|
34
|
+
确实还有数据才扩大容量,输出仍受 max_output_size 限制。gzip ISIZE 继续只作为有界提示。
|
|
35
|
+
|
|
36
|
+
### 串接文件复用解码状态
|
|
37
|
+
|
|
38
|
+
原来每结束一个 member 就销毁、重新创建 GzDecoder。现在通过输入槽位和公开 reset 接口
|
|
39
|
+
复用状态,保留未消费的压缩输入。CRC、位流、窗口有效长度和解析状态均重置。
|
|
40
|
+
适合由许多小 member 组成的 gzip。文件流不改为整文件加载。
|
|
41
|
+
|
|
42
|
+
## 3. 没有保留为默认行为的尝试
|
|
43
|
+
|
|
44
|
+
扫描了 verify 的 16/32/64/128/256/512/1024/2048 KiB 缓冲大小。
|
|
45
|
+
没有找到两个平台、不同数据都获益的默认值,因此继续保持 1 MiB。
|
|
46
|
+
较小缓冲在构建虚拟机上反而可能显著变慢。完整结果见 buffer-sweep-*.json。
|
|
47
|
+
|
|
48
|
+
没有默认开启预取线程、强制 AVX2/AVX512 或改变压缩级别;没有跳过 CRC。
|
|
49
|
+
普通单流 gzip 多核解压尚未实现,不能把 member 状态复用称为多核解码。
|
|
50
|
+
|
|
51
|
+
## 4. 与 0.2.0 的比较方式和限制
|
|
52
|
+
|
|
53
|
+
同平台使用相同输入,通过 SHA256 对齐;独立进程加载各自动态库,预热后测七轮取中位数。
|
|
54
|
+
最终新旧版本串行执行,不同时运行两套性能测试。操作系统文件缓存仍参与文件测试。
|
|
55
|
+
真实内网 UOS 没有实测,Linux 结果来自 Debian 10 / Python 3.4.10 构建虚拟机。
|
|
56
|
+
|
|
57
|
+
Linux 最后一次 16 MiB 普通输入比较中,structured:20.986 → 19.055 ms(1.10 倍);random:10.307 → 5.905 ms(1.75 倍)。
|
|
58
|
+
此前复测曾得到约 1.06/1.37 倍,结果受负载、缓存和分配器影响。
|
|
59
|
+
小输入和 decompress_into 不是所有项目都有收益,不宣称普遍加速。
|
|
60
|
+
|
|
61
|
+
串接 member 文件测试(总原始数据 16 MiB):
|
|
62
|
+
|
|
63
|
+
| member 大小 | 操作 | 0.2.0 | 0.3.0 | 比值 |
|
|
64
|
+
|---|---|---:|---:|---:|
|
|
65
|
+
| 4 KiB,4096 个 | verify | 106.219 ms | 77.710 ms | 1.37 倍 |
|
|
66
|
+
| 4 KiB,4096 个 | file_read | 125.424 ms | 111.137 ms | 1.13 倍 |
|
|
67
|
+
| 64 KiB,256 个 | verify | 11.422 ms | 10.197 ms | 1.12 倍 |
|
|
68
|
+
| 64 KiB,256 个 | file_read | 14.266 ms | 12.952 ms | 1.10 倍 |
|
|
69
|
+
|
|
70
|
+
初轮串接 verify 测试曾只有约 0~2% 变化,因此也不把最终 37% 样例推广为普遍收益。
|
|
71
|
+
单 member 的 open/verify 基本没有本质变化;压缩路径本轮未优化,不能将其计时变化算作收益。
|
|
72
|
+
Windows 多次测试出现明显的环境速度波动,连未改动的压缩/verify 也变化很大,
|
|
73
|
+
因此不把这一轮 Windows 数字作为可靠加速结论。原始样本仍保留供检查。
|
|
74
|
+
|
|
75
|
+
## 5. 正确性与交付
|
|
76
|
+
|
|
77
|
+
Linux Python 3.4.10/3.7 均通过 69 项测试;Windows 通过 68 项并跳过 1 项 Linux 专用测试。
|
|
78
|
+
测试包含 80 组随机输出/容量边界、空 member、千个串接 member、padding、头部 CRC、
|
|
79
|
+
最后 member 损坏、截断、跨 member 字典隔离、输出尾部保持及磁盘写满。
|
|
80
|
+
|
|
81
|
+
Rust clippy 严格警告检查通过。ABI 标记升级为 3,用于拒绝混装旧动态库和新版 Python。
|
|
82
|
+
Python API 用法保持兼容;升级时替换整个 wheel/包,运行时仍无第三方 Python 依赖。
|