day 23 optimize again
commitd60cf6d68fa7d121dce1470c89f65aab3bc8f46b
authorEric Blake <eblake@redhat.com>
Sat, 13 Jan 2024 22:17:47 +0000 (13 16:17 -0600)
committerEric Blake <eblake@redhat.com>
Sun, 14 Jan 2024 03:09:23 +0000 (13 21:09 -0600)
tree747d202fa832f0b076e6813411396ef01237c9f1
parent9fab75da3651920fcc7800e5a1e6f9433a9d86da
day 23 optimize again

Speed up to ~16.3s silent (~26s verbose) by inlining foreach out of
the hot loop, and by reusing the node visit macro as its own witness
of being already visited.  The same number of paths are explored, but
now the progress meter increments only when work is done instead of
when previously visited nodes are hit again, so the counter drops to
6M from 14.7M previously.  (It would also be possible to use
pushdef(`t'n, `show(p)') to track the same work as before, but that
slows verbose execution even more.)
2023/day23.m4