Archive build speedup - #67
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #67 +/- ##
========================================
Coverage 91.34% 91.35%
========================================
Files 53 56 +3
Lines 13118 13722 +604
Branches 1830 1940 +110
========================================
+ Hits 11983 12536 +553
- Misses 523 555 +32
- Partials 612 631 +19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@codex Please summarize the main algorithmic changes |
Main algorithmic changes
Net effectThe PR primarily changes construction, not query semantics: it replaces per-symbol and whole-input intermediate work with dependency-reduced counting, bounded block streaming, bulk direction-mask generation, table/SIMD-based stable compaction, and a fixed-array length-limited Huffman topology builder. Rank, select, serialization, and segment access continue to operate on the same persistent wavelet-tree representation. Commands consulted
No code changes were needed for this summary, so no commit or follow-up pull request was created. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 68b691f409
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (leaves_[symbol] == node) { | ||
| has_mapped_symbol = true; |
There was a problem hiding this comment.
Require one mapping for each nonempty terminal branch
For a Huffman byte artifact whose alphabet contains absent symbols, a corrupted leaf map can assign an absent rank to the same node as the branch's present rank. This loop merely sets has_mapped_symbol repeatedly, so full validation accepts the artifact; subsequent rank and select queries for that absent symbol return occurrences belonging to the present symbol. Count the mappings and reject a nonempty terminal branch unless exactly one rank maps to it.
Useful? React with 👍 / 👎.
|
@codex please give a breakdown of cpu usage for WT construction after this PR changes |
WT construction CPU breakdownI profiled Huffman-shaped Workload and environment
The benchmark deliberately exercises the new byte-specialized path. The constructor first creates the byte histogram and then passes the data into Results
The wall-time speedup is lower than the construction-only speedup because deterministic input generation is identical between runs and becomes a substantial fraction of the much shorter head run. PR-head construction CPU attributionThe profile sampled about 1.78 seconds inside WT construction across eight builds:
Detail within the dominant 86.5%The byte-stream phase divided approximately as follows:
This aligns with the implementation:
What is no longer expensiveThe specialized Huffman topology builder was below meaningful sampling resolution. That is expected because it operates over at most 256 alphabet entries rather than over every input byte; it handles empty/single-symbol cases directly and otherwise builds lengths and the fused tree from fixed-size structures. include/pixie/detail/huffman_build_table.hL384-L409 Likewise, initial frequency collection is now a simple byte-histogram pass. Its four independent counting lanes reduce increment dependencies. include/pixie/detail/byte_histogram.hL15-L48 Interpretation
Profiling caveatGNU No repository changes were required, so I did not create a commit or follow-up PR. Checks and commands
|
No description provided.