refactor(sterni/aoc/2021): fold over 2d array instead of nested list

Seems to save some allocations and thus recover some performance
compared to the two separate folds we had before.

Change-Id: Ie3d283103e6a9b8aa702db633d9c988fda1b2903
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4348
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
sterni 2021-12-16 00:44:51 +01:00
parent 0f5cc25697
commit 3f8c99f5c3

View file

@ -239,7 +239,7 @@ day13Folds ← ParseFolds 1 ⊑ day13Input
PerformAllFolds {𝕩 {(𝕨 _Fold)´𝕩}˜´ 𝕨}
DotMatrix {
width, height 1+´𝕩
width, height 1+˝2𝕩
{𝕩? '█';' '}¨ heightwidth¨((+(width×))´)¨ 𝕩
}