Learnings from day 8 for advent of code in nickel:
`array.fold` is slow on larger lists in nickel. Very slow.
Time to process day 8's input into a list of ~10k numbers: 2 seconds & ~250MiB of ram
Time to find the max in that list using `array.foldl num.max 0 list`: oomkilled after 2 hours for using >60GiB of ram

· · Web · 1 · 0 · 0

Or oops, there was a methodology error in there.
The first one is 2 minutes and ~4GiB of ram, not 2s. I was accidentally leaving part of it un-evaluated.
Still, a darn sight better than the foldl bit.

Ultimately I ended up with this non-foldl max ... that ended up being plenty fast.

Sign in to participate in the conversation
Wobscale Social - a server for friends of the Wob, affiliated with Wobscale Technologies