I tried to optimize my code in preparation from pa...
# advent-of-code
k
I tried to optimize my code in preparation from part two but of course as it turns out that still wasn't fast enough.
j
Nice. Thought I wasn’t going to see any other bit twiddling day 12s here today 😃
You can do 4 fewer gets from the prev generation per cell: shift the pattern left by 1, or it with the next bit mask only the low 5 bits.
Oh I misinterpreted it. I thought pattern was an
Int
, and you were using it as an index into rules
k
Yeah I could fake it a bit faster still, but turns out that's not necessary!