From 79a6ea0902d31b731cbedda6ef09fcccf126b17a Mon Sep 17 00:00:00 2001 From: Harrison Friia <5942798+harrisonfriia@users.noreply.github.com> Date: Tue, 20 Oct 2026 04:51:35 -0700 Subject: [PATCH] perf(glm): use the 0.08 depth rate on one Mac Two Macs move the depth rule's acceptance estimates at 0.08. One Mac left the rate at 0, so it took the core's 0.15. At 0.15 a short run of missed drafts puts a stream's estimate under the line where plain rounds win. The stream goes plain and its probes back off to one draft in 128 rounds, so a reply can stay plain after its drafts would land again. At 0.08 a stream takes about twice the misses in a row to go plain. The constant moves from timing.zig to backend.zig, beside the one-Mac costs. Replies do not change: every depth gives depth 0's tokens. --- zig/src/families/glm/backend.zig | 4 +++- zig/src/families/glm/timing.zig | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/zig/src/families/glm/backend.zig b/zig/src/families/glm/backend.zig index cd3442d33c..ba96a256fb 100644 --- a/zig/src/families/glm/backend.zig +++ b/zig/src/families/glm/backend.zig @@ -17,6 +17,8 @@ const fwd = @import("forward.zig"); /// One stream's window and a shared forward's rows, ms on one M5 Ultra (a pair times its own at load: timing.zig). const one_mac_window_costs = costTable(13.0, 4.1); const one_mac_shared_costs = costTable(8.4 + 4.1, 4.1); +/// The acceptance estimates' rate, below the core's 0.15: a stream takes about twice the misses in a row to go plain. +const depth_rate = 0.08; fn costTable(comptime one: f64, comptime row: f64) [st.max_rows]lanes.config.Cost { var c: [st.max_rows]lanes.config.Cost = undefined; @@ -61,7 +63,7 @@ pub const Backend = struct { .drafts = 4, .window_costs = if (b.costs) |*c| &c.window else if (b.sl.e.ep == null) &one_mac_window_costs else &.{}, .mtp_step_ms = if (b.costs) |c| c.head_ms else 1.3, - .depth_rate = if (b.costs != null) timing.depth_rate else 0, + .depth_rate = depth_rate, .streams_exact = true, .hidden_rows = true, .batch_rows = st.max_rows, diff --git a/zig/src/families/glm/timing.zig b/zig/src/families/glm/timing.zig index 186c6aac24..fc0716bd70 100644 --- a/zig/src/families/glm/timing.zig +++ b/zig/src/families/glm/timing.zig @@ -18,8 +18,6 @@ const room = 112; const warm = 6; /// Head chains of 1 and 8 levels: their difference over 7 is a level's ms. const levels = [2]u32{ 1, 8 }; -/// Depths priced at timed costs sit within a few percent: the acceptance estimates move slower so noise picks no depth. -pub const depth_rate = 0.08; /// The depth rule's costs: timed now (both Macs time, rank 0 keeps them) or kept from an earlier load of this build. pub fn measure(sl: *Slots, gpa: std.mem.Allocator, io: std.Io) !?Costs {