Retroactive ticket (2026-07-07 libdog WEAVE perf session). After DIS-047 removed the Pass-2 remover-union quadratic, a three-agent audit + phase profile of WEAVEMerge (libdog WEAVE.c) showed the RGA-linearise $sort(sks, rga_cmp) was still ~49% of merge wall time (musl smoothsort + an indirect call per compare; 79.9 ms of 164 ms at N=10k lines, -O2), plus ~19% more in the per-pop gmap hash probe of PUSH_CHILDREN. The emit DFS never needs a global order — only each anchor's sibling group contiguous and internally (cidx DESC, ord ASC)-sorted — so the sort is replaceable by O(nu) bucketing with byte-identical output. Also the n·log n term was the main superlinear creep behind DIS-047's WEAVE04 ratio gate (the gate itself proved VM-flaky on mac CI and was disabled the same session).
WEAVE.c (libdog): rgakey qsort + gmap group map, old :819-842; DFS
probe per pop in PUSH_CHILDREN, old :869-887. Bench test/WEAVE04.c.
decode 8.1%, pass1 8.0%, emit 6.6%, pass2 4.7%; merge grows 5.5x for 4x work.
by the DFS, so a global (anchor, cidx, ord) sort does O(n log n) wasted work.
each (tiny) sibling group; resolve each group's parent ONCE so the DFS pushes children by direct index (no hash probe per pop).
green; ~2x+ faster WEAVEMerge on the WEAVE04 workload.
hash collisions (seen guard semantics kept, stack stays 2*nu+1).
gtok[];
per-token-parent cstart/ccnt arrays replace per-pop gmap probes (ROOT group kept addressable via a colliding idh, as before).
WEAVEMerge from git HEAD symbol-renamed viaobjcopy, linked beside the new one; 96 scenarios x 6 merges (both arg orders, chained re-merges, deletes, N=1..5000) memcmp'd — 0 mismatches.
$sort/rga_cmp.cstart/ccnt child runs; probe-free PUSH_CHILDREN.interleaved key/val slots would help — that is DOG-013 T2 (u64map→HASHx) territory. wmerge_commits O(C^2) tail scan is a separate follow-up candidate.
TEST_CXX_FLAGS "-g", empty CMAKE_BUILD_TYPE), soCI times an unshipped build; WEAVE04's ratio gate is disabled pending that.
tree together with the WEAVE04 gate disable. Hashlet TBD on landing.
~/src/libdog has M WEAVE.c (uncommitted; rga_cmp/$sort(sks…) absent in the worktree copy, still present in HEAD 79612854); the WEAVE04 ratio-gate disable is ALREADY landed (commented out at test/WEAVE04.c:135). Only T5 (land) remains.