(c -> d -> e) -> (a -> b -> c) -> (a -> b -> d) -> a -> b -> e
to solve that tangle but even that is a bit of an askrisu@canopy:advent2024$ hyperfine "luajit 6x.lua < input/6.txt"
Benchmark 1: luajit 6x.lua < input/6.txt
Time (mean ± σ): 8.755 s ± 0.121 s [User: 7.903 s, System: 0.823 s]
Range (min … max): 8.514 s … 8.994 s 10 runs
(c -> d -> e) -> (a -> b -> c) -> (a -> b -> d) -> a -> b -> e
to solve that tangle but even that is a bit of an ask if bound_checker(guard_x + dx, guard_y + dy, width, height) and map[(guard_y + dy - 1) * width + guard_x + dx] then
(edited)if bound_checker(guard_x + dx, guard_y + dy, width, height) and map[(guard_y + dy - 1) * width + guard_x + dx] then
(edited)risu@canopy:advent2024$ hyperfine "luajit 6x.lua < input/6.txt"
Benchmark 1: luajit 6x.lua < input/6.txt
Time (mean ± σ): 8.755 s ± 0.121 s [User: 7.903 s, System: 0.823 s]
Range (min … max): 8.514 s … 8.994 s 10 runs