Files
rose-ash/lib/apl/tests
giles 80dac0051d
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 43s
apl: perf — fix quadratic append in permutations, restore queens(8)
apl-permutations was doing (append acc <new-perms>) which is
O(|acc|) and acc grows ~N! big — total cost O(N!²).

Swapped to (append <new-perms> acc) — append is O(|first|)
so cost is O((n+1)·N!_prev) per layer, total O(N!).  q(7)
went from 32s to 12s; q(8)=92 now finishes well within the
300s timeout, so the queens(8) test is restored.

497/497.  Phase 8 complete.
2026-05-07 19:33:09 +00:00
..