diff --git a/docs/convergence-report.md b/docs/convergence-report.md new file mode 100644 index 0000000..9ca7d84 --- /dev/null +++ b/docs/convergence-report.md @@ -0,0 +1,54 @@ +# Convergence Report + +Standing invariants: all green. + +## Recovered from interrupted wrap + +Previous session completed 🎯T2 implementation: added `reflect.Kind` dispatch for int/float/string fast-paths in `resolveHashFunc`, `resolveSeededHashFunc`, and `EqualFuncFor`. All read benchmarks confirmed 0 allocs/op. Changes are uncommitted and need to go through PR flow. + +## Movement + +- 🎯T2: not started → close (implementation complete, uncommitted) +- 🎯T3: (unchanged) + +## Gap report + +### 🎯T2 All read operations are zero-alloc [weight 5, effective 4.0] +Gap: close +All acceptance criteria met in code: Map.Get, Map.Has, Set.Has all report 0 B/op, 0 allocs/op at 1k and 1M sizes. Tests pass. Not yet committed or delivered (no PR). + + Implied: not yet delivered (changes uncommitted, no PR) + +### 🎯T3 No-op write operations are zero-alloc [weight 3, effective 2.5] +Gap: not started (status only) +No work started. No changed-file overlap. + +## Recommendation + +Work on: **🎯T2 All read operations are zero-alloc** +Reason: Highest effective weight (4.0), code is done, just needs delivery. Closing this is nearly free. + +## Suggested action + +Commit the uncommitted changes and run `/push` to create a PR and drive it through CI. + +Type **go** to execute the suggested action. + + diff --git a/docs/targets.md b/docs/targets.md index 1dbe322..8a93199 100644 --- a/docs/targets.md +++ b/docs/targets.md @@ -1,20 +1,9 @@ # Targets - + ## Active -### 🎯T2 All read operations are zero-alloc -- **Weight**: 5 (value 8 / cost 2) -- **Estimated-cost**: 2 -- **Acceptance**: - - `Map.Get`, `Map.Has`, `Set.Has` report 0 B/op, 0 allocs/op in benchmarks at 1k and 1M sizes - - No regression in throughput (ns/op must not increase) - - All existing tests pass -- **Context**: Currently 1 alloc/op remains in Map.Get from `resolveSeededHashFunc` fallback boxing `int` through `hash.Any(key, seed)`. Adding an `int` fast-path (like the existing `string` and `float64` paths) would eliminate it. Similar pattern applies to other common key types. -- **Status**: identified -- **Discovered**: 2026-03-08 - ### 🎯T3 No-op write operations are zero-alloc - **Weight**: 3 (value 5 / cost 2) - **Estimated-cost**: 2 @@ -31,6 +20,18 @@ ## Achieved +### 🎯T2 All read operations are zero-alloc +- **Weight**: 5 (value 8 / cost 2) +- **Estimated-cost**: 2 +- **Acceptance**: + - `Map.Get`, `Map.Has`, `Set.Has` report 0 B/op, 0 allocs/op in benchmarks at 1k and 1M sizes + - No regression in throughput (ns/op must not increase) + - All existing tests pass +- **Context**: Used reflect.Kind dispatch in resolveHashFunc, resolveSeededHashFunc, and EqualFuncFor to catch derived types and route through direct hash/equality functions. Added size-based integer fast-paths to resolveSeededHashFunc. +- **Status**: achieved +- **Discovered**: 2026-03-08 +- **Achieved**: 2026-03-08 + ### 🎯T1 Map[K,V] hot-path operations avoid per-call allocations - **Weight**: 5 (value 8 / cost 2) - **Estimated-cost**: 2