Couldn't you just use the naive adder as an increment, if you check that the input is not -1 first?
@TimwiSoMuchCode4 ай бұрын
That is correct! Curiously, when I made all this back in 2011, it didn’t occur to me then. It did occur to me when making this video, so I tried it out. Turns out it’s slower than the specialized increment function I wrote. I don’t know why that is the case.