Repository navigation
Gleipnir 1.2: model 4 at -9, x86 contexts at every preset, huge pages - #8
Merged
Merged
Conversation
Adds, each switched per preset through a feature mask chosen from its measured size gain and time cost: - a second mixer selected by the previous byte, averaged with the first - a long-match model (24-byte minimum) beside the existing match model - contexts on the byte each match model expects - x86 instruction contexts (table-driven length decoder), in x86 blocks only - line contexts: two lines up, the three bytes above, field number - an order-3 indirect context, four bytes of order-1 follow-history - an order-0 context, linear-domain copies of each context's estimate - a run model: last byte and repeat count per byte/word context - the word-transform contexts on untransformed text at -9 Archives record the model: v2/v3 decode with the 1.1 model bit for bit, v4 with the new one; repair keeps the source's version. Presets below -5 are unchanged, and run a copy of the bit path compiled without the new code so they pay nothing for it.
…t -3 Each beats the ladder's own size-per-time rate: on five files at -1, x86 -3.8% for +11% time, order 0 -0.5% for +4%, match context -1.4% for +9%. Silesia per file: -1 41,881,656, -3 38,743,491 (1.1: 42,620,088 / 39,429,389).
madvise(MADV_HUGEPAGE) on every model table of 4 MB and up. Five files, three interleaved runs, output identical: -9 214.4 s -> 158.8 s (-26%), -3 32.5 s -> 30.2 s (-7%). A no-op where THP is off or already always, and on other platforms. ARCHITECTURE: section 30 records the model-4 search -- what was added, what each costs, what was rejected, how the presets were chosen -- and 23.1 records the huge-page measurement that replaces 'untestable'.
… model 4 Re-checked on full Silesia at equal time, the model-4 additions at -1..-7 tied or lost to stepping up a preset (-5 was 1.5% worse than 1.1's -7 at the same time); the five-file set that chose them is two-fifths x86 code. The x86 contexts run only on x86 blocks, so -1..-7 now code everything else byte-identically to 1.1 on the 1.1 bit path (V4ON), and x86 code smaller.
…phs, 1.2.0 README gains a 'What 1.2 changed' section with the interleaved full-Silesia table (1.1 vs 1.2 at every preset), enwik8/enwik9 results and huge pages; the 1.1 single-session preset table stays, labelled as 1.1's. LEADERBOARDS projects 1.2 (~27th LTCB, ~26th with -m1; ~33rd Silesia) with the rows a resubmission would use. USAGE, SECURITY and dist texts updated for format v4, memory and the new -9; version 1.2.0 in packaging and CI. Ranking and per-file graphs regenerated; Calgary/Canterbury -9 re-measured.
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.
Summary
Gleipnir 1.2.0.
-9becomes a maximum-ratio preset built on a new model.-1to-7keep 1.1's model and add x86 instruction contexts only. On Linux, huge pages make it faster. Archive format v4.Results (full corpora, every result round-trip verified)
-9, per file-9 -s1000-9 -s1000-9 -s1000 -m1zpaq 6.42 -maxAgainst the published tables that would be about 33rd on Silesia (listed: 49th) and about 27th on LTCB (26th with
-m1; listed: 35th). Nothing has been submitted.Full Silesia, 1.1 and 1.2 interleaved file by file,
-t1:-1-3-5-7-9At
-1to-7every file without x86 code is byte-identical to 1.1. The change is all in mozilla and ooffice (ooffice −12% at-1).What changed
Model 4 (
-9): twelve additions, each still positive with the others on. The biggest:ARCHITECTURE.md §30 has the search: what each adds, what it costs, and what was rejected.
Presets: model-4 features at
-1to-7were measured too, and none beat stepping up a preset on full Silesia at equal time. The first cut had them and lost 1.5% at-5; the small screening set was two-fifths x86 code. So-1to-7take only the x86 contexts, which run only on x86 blocks.Compatibility: archive v4. v2 and v3 decode with the 1.1 model bit for bit, and
rkeeps a repaired archive's version. The bit path is compiled twice, so batches that run no model-4 code take the exact 1.1 path at 1.1 speed.Huge pages:
madvise(MADV_HUGEPAGE)on every table of 4 MB and up. On Linux with THP inmadvisemode,-9runs 26% faster and-37% faster, output identical. It's a no-op elsewhere.Memory: a
-9worker now budgets about 1.5 GB (1.1: 1.1 GB). Silesia peaks at 1,579 MB. enwik9-9 -s1000peaks at 3.6 GB.Docs: README "What 1.2 changed", USAGE, SECURITY, LEADERBOARDS projections and dist texts are updated. Version 1.2.0 is set in packaging and CI. The ranking and per-file graphs are regenerated.
Not re-measured
The single-session 1.1 preset table and its ladder/speed/memory graphs are kept and labelled as 1.1's. 1.2's differences are in the interleaved table above rather than mixed into another session's timings.
Test plan
fuzz.py,tfuzz.py,gfuzz.py,sfuzz.py,wfuzz.py(at-3,-5,-7,-9)-5/-7/-9with-t6 -s1, extracted-t3, checked witht -D-1/-3/-5/-7/-9, enwik8-9, and Calgary/Canterbury-9round-trip; both enwik9 runs passt -D-9/-7/-1(Linux)