Tom Boucher
d77170a25d
perf( #312 ): index argv once in parseNamedArgs ( #392 )
...
parseNamedArgs re-scanned argv with indexOf/includes once per flag —
O(flags * argv) — on the command-dispatch hot path (24 call sites across
gsd-tools + init/state/validate routers). Build a first-index Map of argv
tokens in a single pass and use it for the flag lookups, dropping it to
O(argv + flags). Semantics are identical: firstIndex.get(t)??-1 === indexOf(t),
firstIndex.has(t) === includes(t); first-occurrence-wins and the value-token
rejection are preserved. Adds the first behavior-lock tests for the module.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-27 20:21:36 -04:00
..
2026-05-12 20:15:43 -04:00
2026-05-24 16:32:28 -04:00
2026-05-26 11:57:39 -04:00
2026-05-11 23:01:34 -04:00
2026-05-26 18:56:00 -04:00
2026-05-06 21:51:29 -04:00
2026-05-13 19:34:23 -04:00
2026-05-26 18:56:00 -04:00
2026-05-26 11:23:53 -04:00
2026-05-13 12:45:16 -04:00
2026-05-20 23:09:42 -04:00
2026-05-26 13:49:07 -04:00
2026-05-27 20:21:36 -04:00
2026-05-24 16:32:28 -04:00
2026-05-27 20:21:29 -04:00
2026-05-25 09:54:50 -04:00
2026-05-26 12:25:32 -04:00
2026-05-26 12:22:02 -04:00
2026-04-30 01:04:41 -04:00
2026-05-27 20:21:08 -04:00
2026-05-25 09:54:50 -04:00
2026-05-13 19:34:23 -04:00
2026-05-15 19:52:17 -04:00
2026-05-13 21:19:47 -04:00
2026-05-13 19:34:23 -04:00
2026-05-20 22:39:34 -04:00
2026-05-15 11:59:43 -04:00
2026-05-15 19:52:17 -04:00
2026-05-26 11:23:53 -04:00
2026-05-22 11:53:40 -04:00
2026-05-20 23:10:09 -04:00
2026-05-11 14:36:14 -04:00
2026-05-16 00:07:59 -04:00
2026-05-20 23:12:08 -04:00
2026-05-13 19:34:23 -04:00
2026-05-27 20:21:18 -04:00
2026-05-15 19:32:02 -04:00
2026-05-22 12:28:16 -04:00
2026-05-08 21:25:37 -04:00
2026-05-26 12:25:52 -04:00
2026-05-25 09:54:50 -04:00
2026-05-27 20:21:12 -04:00
2026-05-26 12:21:04 -04:00
2026-05-25 09:54:50 -04:00
2026-05-26 11:57:39 -04:00
2026-05-26 11:24:01 -04:00
2026-05-13 20:46:02 -04:00
2026-05-25 09:54:50 -04:00
2026-05-18 23:13:09 -04:00
2026-05-13 14:10:15 -04:00
2026-05-26 12:21:04 -04:00
2026-05-22 11:53:40 -04:00
2026-05-17 01:12:00 -04:00
2026-05-24 14:17:03 -04:00
2026-05-26 11:24:01 -04:00
2026-05-26 11:24:01 -04:00
2026-05-25 09:54:50 -04:00
2026-05-25 09:54:50 -04:00
2026-05-23 10:15:03 -04:00
2026-05-24 18:14:56 -04:00
2026-05-22 16:22:41 -04:00
2026-05-26 18:55:20 -04:00
2026-05-25 09:54:50 -04:00
2026-05-20 15:56:22 -04:00
2026-05-26 12:22:08 -04:00
2026-05-26 18:56:00 -04:00
2026-05-13 20:46:02 -04:00
2026-04-30 11:38:13 -04:00
2026-05-26 11:23:53 -04:00
2026-05-25 09:54:50 -04:00
2026-05-26 12:21:04 -04:00
2026-05-25 09:54:50 -04:00
2026-05-25 09:54:50 -04:00
2026-05-26 12:20:40 -04:00
2026-05-26 11:24:12 -04:00
2026-05-26 11:24:12 -04:00
2026-05-22 11:23:34 -04:00