Join Slack
Powered by
I tried to optimize my code in preparation from pa...
# advent-of-code
k
karelpeeters
12/12/2018, 10:49 PM
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
joelpedraza
12/12/2018, 11:07 PM
Nice. Thought I wasn’t going to see any other bit twiddling day 12s here today 😃
joelpedraza
12/12/2018, 11:12 PM
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.
joelpedraza
12/12/2018, 11:22 PM
Oh I misinterpreted it. I thought pattern was an
Int
, and you were using it as an index into rules
k
karelpeeters
12/13/2018, 8:42 AM
Yeah I could fake it a bit faster still, but turns out that's not necessary!
5
Views
Open in Slack
Previous
Next