Teknium
ea6eaabd8f
perf(read_file): compact line-number gutter — ~14% fewer tokens per read ( #35368 )
...
read_file's gutter used a fixed-width zero/space-padded prefix
(" 1|content"). The padding is pure token overhead: measured with
cl100k on real Hermes source, the padded gutter costs ~48% more tokens
than bare content and ~16% more than a compact "<n>|content" gutter,
because the leading spaces tokenize into extra tokens on every line.
Switched the default to the compact "<n>|content" form. An A/B
(Sonnet 4.6 via OpenRouter, 2 passes, 4-task battery, every claim
verified against ground truth) showed:
- padded : 4/4 PASS both passes
- compact : 4/4 PASS both passes ← keeps line-referencing + patch
- none : 3/4 PASS both passes ← dropping numbers entirely made
the model hand-count lines and answer off-by-one (33 vs 34)
So we keep the line numbers (the model genuinely uses them to reference
lines) but drop the wasteful padding — capturing ~14% of the read-token
cost with zero measured accuracy change. Dropping numbers entirely
(the larger 33% saving) is rejected: it regresses line-referencing.
patch/fuzzy_match never consumed the gutter (they match old_string text
and compute char offsets internally), so editing is unaffected. No
downstream parser keys on the fixed-width columns. HERMES_READ_GUTTER=
padded restores the legacy format for anyone relying on alignment.
Tests: updated the 3 format assertions to the compact gutter; added an
env-override test for the legacy padded format. 209 file-tool tests green.
2026-05-30 07:01:22 -07:00
..
2026-02-26 03:20:08 +03:00
2026-05-22 03:33:01 -07:00
2026-05-28 22:26:25 -07:00
2026-03-23 07:43:12 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-12 15:14:49 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 15:43:55 +10:00
2026-04-17 16:05:04 -07:00
2026-04-24 03:46:46 -07:00
2026-05-28 22:26:25 -07:00
2026-04-08 13:44:58 -07:00
2026-05-28 22:26:25 -07:00
2026-05-09 13:35:39 -07:00
2026-05-29 03:58:56 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-04-26 09:57:58 -07:00
2026-05-06 03:41:21 -07:00
2026-05-28 22:26:25 -07:00
2026-05-22 19:46:18 -07:00
2026-05-07 05:38:05 -07:00
2026-04-30 20:33:33 -07:00
2026-05-28 22:26:25 -07:00
2026-04-11 02:58:48 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-17 02:29:41 -07:00
2026-05-29 03:44:49 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-21 17:38:19 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-08 14:55:40 -07:00
2026-05-28 22:26:25 -07:00
2026-02-26 13:55:54 +03:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-03-02 04:34:21 -08:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-04-14 21:20:37 -07:00
2026-05-29 11:49:54 +10:00
2026-05-07 06:17:49 -07:00
2026-05-25 12:24:58 +10:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:09 -07:00
2026-05-29 03:44:49 -07:00
2026-04-17 19:04:11 -07:00
2026-05-30 07:01:22 -07:00
2026-05-30 07:01:22 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-04-23 15:11:52 -07:00
2026-04-21 16:41:26 -07:00
2026-05-28 22:26:25 -07:00
2026-04-10 03:01:46 -07:00
2026-04-10 21:14:32 -07:00
2026-04-20 00:58:16 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-30 06:25:50 -07:00
2026-03-14 11:27:02 -07:00
2026-05-28 03:27:20 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-21 16:40:04 +05:30
2026-05-15 01:33:13 -07:00
2026-04-23 03:01:18 -07:00
2026-04-21 13:35:31 -07:00
2026-04-28 22:16:08 -07:00
2026-05-28 22:26:25 -07:00
2026-05-18 21:01:14 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 01:48:08 -07:00
2026-05-04 15:31:47 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-04-09 16:24:53 -07:00
2026-05-28 00:19:31 -07:00
2026-05-29 22:26:24 +05:30
2026-05-28 22:26:25 -07:00
2026-04-16 12:36:49 -07:00
2026-05-28 22:26:25 -07:00
2026-04-21 05:19:03 -07:00
2026-05-28 22:26:25 -07:00
2026-04-29 20:05:32 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-16 13:06:56 -07:00
2026-04-19 16:31:07 -07:00
2026-04-19 16:31:07 -07:00
2026-04-16 21:57:10 -07:00
2026-04-16 21:57:10 -07:00
2026-05-07 05:35:33 -07:00
2026-05-28 22:26:25 -07:00
2026-05-15 14:00:01 -07:00
2026-04-16 21:57:10 -07:00
2026-05-07 07:08:04 -07:00
2026-05-30 02:08:29 -07:00
2026-05-15 14:00:01 -07:00
2026-04-16 21:57:10 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-04-14 10:18:05 -07:00
2026-05-07 07:03:21 -07:00
2026-05-28 22:26:25 -07:00
2026-05-08 09:27:26 -07:00
2026-05-08 09:27:26 -07:00
2026-04-23 15:14:11 -07:00
2026-05-28 22:26:25 -07:00
2026-05-27 00:43:32 -07:00
2026-04-10 03:01:46 -07:00
2026-05-28 22:26:25 -07:00
2026-04-05 12:46:07 -07:00
2026-04-22 14:45:50 -07:00
2026-05-25 15:18:45 -07:00
2026-05-20 01:46:40 -05:00
2026-05-25 06:13:36 -07:00
2026-05-29 04:22:41 -07:00
2026-04-13 16:32:04 -07:00
2026-05-13 17:32:22 -07:00
2026-05-28 22:26:25 -07:00
2026-05-18 10:37:35 -07:00
2026-05-28 22:26:25 -07:00
2026-05-24 18:05:33 -07:00
2026-05-18 22:19:50 -07:00
2026-05-30 02:39:08 -07:00
2026-05-17 23:28:45 -07:00
2026-04-26 11:55:02 -07:00
2026-05-28 22:26:25 -07:00
2026-05-17 02:29:41 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-03-04 05:30:43 -08:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 12:24:39 -07:00
2026-05-19 14:17:38 -07:00
2026-05-28 01:42:19 -07:00
2026-05-29 12:24:39 -07:00
2026-05-30 02:05:10 -07:00
2026-05-27 00:43:32 -07:00
2026-04-29 21:56:47 -07:00
2026-04-24 07:06:11 -07:00
2026-05-28 22:26:25 -07:00
2026-04-20 03:07:32 -07:00
2026-05-29 16:07:15 +10:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 11:49:54 +10:00
2026-04-04 16:57:24 -07:00
2026-05-28 22:26:25 -07:00
2026-04-08 21:37:51 -07:00
2026-04-20 23:20:33 -07:00
2026-05-28 22:26:25 -07:00
2026-05-09 14:46:34 -07:00
2026-03-29 21:51:44 -07:00
2026-04-09 16:24:53 -07:00
2026-05-27 00:43:32 -07:00
2026-04-30 20:38:09 -07:00
2026-04-08 17:23:15 -07:00
2026-05-25 14:52:24 -07:00
2026-05-28 22:26:25 -07:00
2026-04-11 16:22:50 -07:00
2026-05-29 13:35:39 +10:00
2026-04-23 21:51:19 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 02:04:12 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 13:24:12 -07:00
2026-05-25 01:41:19 -07:00
2026-05-29 13:24:12 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-15 12:11:32 -07:00
2026-04-16 14:23:16 -07:00
2026-05-13 17:32:22 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 13:24:12 -07:00
2026-05-18 22:29:45 -07:00
2026-05-25 05:15:55 -07:00
2026-05-28 22:26:25 -07:00
2026-05-24 18:04:54 -07:00
2026-05-13 22:04:28 -07:00
2026-05-25 14:30:06 -07:00
2026-05-18 10:51:15 -07:00
2026-05-28 22:26:25 -07:00
2026-05-13 16:39:41 -07:00
2026-05-13 16:39:41 -07:00
2026-05-29 22:26:24 +05:30
2026-05-29 03:58:56 -07:00
2026-05-30 01:40:39 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 04:52:42 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 04:52:42 -07:00
2026-05-29 04:00:00 -07:00
2026-05-13 22:31:28 -07:00
2026-05-28 04:52:42 -07:00
2026-05-28 22:26:25 -07:00
2026-03-01 01:54:27 +03:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-21 02:38:45 +05:30
2026-05-25 03:35:33 -07:00
2026-05-28 22:26:25 -07:00