(NekoSock) Miya Ironami :verified_trans: on Nostr: We're at IKEA while the code runs on my laptop back home. We'll see if it's done by ...
We're at IKEA while the code runs on my laptop back home. We'll see if it's done by the time I come back.
One optimisation I thought of is that the same stone will always generate the same number of stones after n iterations, so we could save that so that if the same number pops up twice, we can skip ahead to the number of stones generated by its final iteration.
Problem is that I think such a structure would be massive and couldn't fit in memory.
I think you just can't store all the numbers in an array in memory in iteration 75, there are too many of them, so that makes optimising hard. Like we can't look for how many times the same number happens per iteration because that would require having an array of all the numbers.
One optimisation I thought of is that the same stone will always generate the same number of stones after n iterations, so we could save that so that if the same number pops up twice, we can skip ahead to the number of stones generated by its final iteration.
Problem is that I think such a structure would be massive and couldn't fit in memory.
I think you just can't store all the numbers in an array in memory in iteration 75, there are too many of them, so that makes optimising hard. Like we can't look for how many times the same number happens per iteration because that would require having an array of all the numbers.