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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
//! The measured evidence: one [`Calibration`] row per (architecture, kernel) pair
//! anybody has actually timed, plus the fail-safe row for everyone else.
use Calibration;
use crateMAX_CONJUNCTS;
use crateKernel;
/// Minted by `cargo run --release --example mint` over 64 MiB of this repository's
/// real source, each kernel timed alone as the minimum of seven full traversals.
///
/// These numbers state the whole economics of this crate:
///
/// * the sieve runs at **0.188 ns/B**, so it beats the engine's per-byte walk
/// (1.262) by **6.7x** — a real advantage, and the reason any of this pays;
/// * but the engine's *skip* runs at **0.0158 ns/B**, which is still **12x faster
/// than the sieve**. Nothing that inspects every byte can front a `memchr`. That is
/// not a defect in the kernel; it is the arithmetic that decides where it belongs.
///
/// `dfa_excursion` is solved from eleven lead bytes spanning two orders of magnitude
/// of frequency rather than assumed, and the eleven solutions agree within 1.7x
/// (7.26 to 12.12) around the mean of 9.75. They did **not** agree while the escape
/// frequency was read at class resolution — the same eleven bytes then spanned 3.6 to
/// 35.2 — so that 10x spread was the approximation talking, and closing it is what
/// makes a single coefficient defensible here.
///
/// The one-conjunct slot is unmeasured because the lattice harvest fills to
/// [`MAX_CONJUNCTS`] whenever it yields anything at all, so no pattern on the mint's
/// slate reaches it. [`Calibration::sieve_per_byte`] extrapolates it conservatively
/// rather than treating the hole as free.
///
/// Every figure is the minimum of seven full traversals and still carries roughly
/// 10% run-to-run variance — this laptop routinely has ten coworker agents on it, so
/// a re-mint that moves a coefficient by a tenth has not found anything. Because the
/// gate is scale-invariant, that variance costs no decisions: a run under load
/// inflates all four numbers together.
///
/// **Re-minted 2026-08-03** because the kernel changed under it. The old row priced
/// the sieve at 0.514 ns/B, measured when [`crate::shuffle`] held the state in the
/// register and ran one dependent shuffle per byte; holding the transition *function*
/// instead lets four slices compose in parallel and took the same slate to 0.188.
/// Nothing else in this row was meant to move — `dfa_skip`, `dfa_walk` and
/// `dfa_excursion` time `regex-automata`, which did not change — and the ≤8% they
/// drifted is the run-to-run variance above. They are re-taken anyway rather than
/// spliced, because the gate reads *ratios* between these numbers and a ratio built
/// from two different afternoons is not a measurement of anything.
///
/// `skip_excursion` **is** spliced in, and it is the one coefficient here that may
/// be. The rule above exists because a ratio between two absolute ns/B figures is
/// only meaningful when both saw the same machine; this coefficient is not an
/// absolute at all. It is dimensionless and already self-normalized *inside a single
/// interleaved timing window* — `mint`'s `paired` re-times both its baselines against
/// the pattern they divide, round by round — so it carries no dependence on the
/// afternoon it was taken. That is checkable rather than asserted: two consecutive
/// paired mints under load average 12 read `[9.245, 6.398]` and `[9.411, 6.823]`,
/// while the unpaired sweep they replaced read `5.33` and `9.08` for the same
/// instrument on consecutive runs. The higher pair is the one recorded, because an
/// overstated excursion can only decline a skip.
///
/// `dfa_excursion` still carries its pre-pairing value and is the coefficient most
/// likely to move on the next full re-mint: measured unpaired it drifts ~21% run to
/// run on this machine. It is left alone rather than half-corrected, for the
/// two-afternoons reason above — re-mint the row whole.
pub const MACOS_AARCH64: Calibration = Calibration ;
/// Native x86_64 Linux on an idle 13th-gen Intel box, 20 logical cores.
///
/// **Re-minted 2026-08-03**, same day and same procedure as [`MACOS_AARCH64`], and
/// for the same reason: the prior row (2026-07-29) timed the serial-shuffle kernel,
/// which [`crate::shuffle`] no longer runs — it now composes four slices in parallel
/// against the held transition function. This row supersedes the old one outright
/// rather than adjusting it; every figure below is a fresh, complete, same-machine
/// measurement, not a splice.
///
/// With both rows on the composing kernel, they finally read as a comparison instead
/// of an artifact of two different afternoons. Absolute walk cost is nearly identical
/// (1.252 against arm64's 1.262 ns/B — a dependent-load chain either way), and
/// SSSE3's `memchr` is, if anything, the *cheaper* accelerator relative to its own
/// walk here (skip/walk 1.03% against NEON's 1.25%) — the opposite of what the old,
/// kernel-mismatched row implied. The sieve itself is where the silicon still
/// disagrees: 0.218 ns/B here against 0.188 on arm64, a ~16% gap the shared kernel
/// shape does not erase. Inheriting one machine's numbers on the other would still
/// misprice which patterns arm — which is the whole reason this crate keeps a row
/// per (architecture, kernel) pair instead of one default.
pub const LINUX_X86_64: Calibration = Calibration ;
/// The answer for a machine nobody has measured: **nothing is known**, so the sieve
/// price reads infinite and every pattern declines.
///
/// This is deliberately not a guess averaged from the rows above. The ratios are an
/// instruction-set property, and a target absent from [`MINTED`] is one whose
/// `memchr`, dependent-load walk, and byte shuffle stand in a relationship nobody has
/// timed — including, most sharply, a target with no byte shuffle at all, where the
/// sieve runs [`crate::shuffle::scalar`] and any vector-measured coefficient would be
/// pure optimism. Callers who would rather measure than decline can mint their own
/// and pass it in a [`crate::Policy`]; `cargo run --release --example mint` prints the
/// row.
pub const UNMEASURED: Calibration = Calibration ;
/// Every (architecture, kernel) pair anybody has actually measured. [`super::active`]
/// picks from here by matching the running target; adding silicon means adding a
/// row, not editing a default.
pub const MINTED: & = &;