1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
//! Shared SEFER_* fixture constants for `tests/builder.rs` and
//! `benches/size_classes_bench.rs` (rush-tests review T4/task #1479):
//! previously duplicated in both files, joined only by a "keep in sync"
//! comment on each side -- a single-sided edit desynced them silently.
//! `tests/common/mod.rs` is the standard Rust convention for a test helper
//! module that is NOT itself compiled as a separate test binary; the bench
//! reaches it via an explicit `#[path = "../tests/common/mod.rs"]`.
//!
//! `pub(crate)`, not `pub` (Sol-run7 P4-1/task #1482): each consumer
//! (`tests/builder.rs`, the bench) compiles this file as a private child
//! module of its OWN crate root, so `pub` here never actually widens the
//! published crate's semver surface -- `pub(crate)` says so explicitly
//! instead of relying on that fact being obvious from context.
//!
//! `#![allow(dead_code)]`: each of the three consumers (`tests/builder.rs`,
//! `tests/proptest_builder.rs`, the bench) uses a different subset of these
//! items -- e.g. `proptest_builder.rs` uses only [`walk_class_for`] -- so
//! `dead_code` (a per-compilation-unit lint) fires on whatever a given
//! consumer doesn't happen to import, even though every item here is used by
//! at least one of the three.
use ;
/// Sefer's concrete parameterization (49 classes; the default in-tree
/// scheme) -- the realistic production-like configuration the actual
/// allocator uses. A snapshot, not a live link: this crate cannot depend on
/// the root crate, so nothing here re-syncs automatically if the root's
/// `EXTRAS`/`GEO_COUNT`/`MIN_BLOCK`/growth ever change (fh publication audit
/// P4-5).
pub const SEFER_MIN_BLOCK: usize = 16;
pub const SEFER_EXTRAS: & = &;
pub const SEFER_GEO: usize = 40;
pub const SEFER_N: usize = SEFER_GEO + SEFER_EXTRAS.len;
pub const HUGE_THRESHOLD: usize = 4 * 1024 * 1024;
pub const SEFER_PARAMS: Params = new;
pub const SEFER_TABLE: = ;
pub const SEFER_MAX: usize = SEFER_TABLE;
pub const SEFER_L: usize = size2class_len;
// `static`, not `const`: a `const` this size re-materializes at every use
// site (see the crate's own SizeClasses doc for why).
pub static SEFER_SC: = build;
/// Slow-path (size, align) pairs, genuinely exercising the divisibility-jump
/// mechanism (pinned by `sefer_bench_jump_rows_genuinely_exercise_the_slow_path`
/// in `tests/builder.rs`). Seed class 18 (block 1200), 4 jump-loop iterations
/// to `Some(21)` (block 2048).
pub const JUMP_A: = ;
/// Seed class 22 (block 2368), 3 jump-loop iterations to `Some(25)` (block 4096).
pub const JUMP_B: = ;
/// A slow-path case seeded from a lower, denser region of the table than
/// `JUMP_A`/`JUMP_B` (not a deeper one -- at 2 jump-loop iterations it is
/// the SHALLOWEST of the three, not a "multi-iteration" case relative to
/// them): seed class 14 (block 608, not 512-divisible), 2 jump-loop
/// iterations to `Some(17)` (block 1024). Single source shared by
/// `tests/builder.rs` and `benches/size_classes_bench.rs` (the two files
/// previously held independent copies of this constant under a comment
/// claiming a test-based drift guard that could not actually see the other
/// copy -- moved here so the guarantee is structural, matching `JUMP_A`/`JUMP_B`).
pub const JUMP_MULTI: = ;
/// A slow-path case that returns `None`: seed class 36 (block 17760, not
/// 16384-divisible), 10 jump-loop iterations -- visiting 10 of the 13
/// remaining classes (indices 37, 38 and 40 are skipped by the round-up;
/// skipping is what the jump algorithm is for), none of the visited ones
/// 16384-divisible. The `None` comes from the `next_idx >= L - 1`
/// index-space guard firing from inside the loop body on the 10th
/// iteration (at the last class, index 48, still `< N`) -- NOT from
/// running off the end of the table (`class_for`'s own doc proves that
/// path is unreachable).
pub const JUMP_NONE: = ;
/// A denser align than `JUMP_A` (128 divides ~31% of `SEFER_TABLE`'s entries
/// vs 256's ~20%): seed class 6 (block 144, not 128-divisible), 2 jump-loop
/// iterations to `Some(9)` (block 256).
pub const JUMP_DENSE: = ;
/// The PRE-jump reference algorithm `SizeClasses::class_for`'s
/// divisibility-jump slow path must be equivalent to: seed at the lookup,
/// then step ONE class at a time until the first whose block is a multiple
/// of `align`. Generic over `table`/`min_block` so every "reference walk"
/// consumer (the bench, the multi-scheme proptests) shares one
/// implementation (claude publication review P3-4: this used to be
/// duplicated independently in `benches/size_classes_bench.rs` and
/// `tests/proptest_builder.rs`, the former under a rationale -- "bench files
/// cannot import from `tests/`" -- that the same file's own `#[path]` import
/// of this module thirty lines above already disproved).
pub