day 15 golf more, 710 effective bytes
commit0315074fc670cd81e9be6775ca918abaa2f3729f
authorEric Blake <eblake@redhat.com>
Mon, 18 Dec 2023 14:04:30 +0000 (18 08:04 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 18 Dec 2023 15:24:50 +0000 (18 09:24 -0600)
treea904564296ca7c958fbed92b89fc49f94abdcd8b
parent68fe4fe230cbaf7886783a5739539def55f157b0
day 15 golf more, 710 effective bytes

727 bytes here; remove 9 newlines plus these 8 bytes: "$1,a,97,".
Adds more time; now >26m.

For grins and giggles, I tested how bad the O(n^3) effects are.
Comparing the sample input (52 bytes, 11 elements):
$ m4 -dae --trace=_ -DI=file -Dfile=tmp.15 day15.golfm4 2>&1 | wc
  10195   17974 1841213
with my input (22969 bytes, 4000 elements):
$ m4 -dae --trace=_ -DI=file -Dfile=day15.input day15.golfm4 2>&1 | wc
58172577 2885010715 625012937407

Yes, that really is 58 million calls, and making m4 parse over half a
terrabyte of data JUST on the arguments and expansion of my macro (not
to mention the parsing of the two index() and ifelse() per _() call).
2023/day15.golfm4