2 ms·
> This also misses loop unrolling. It's mentioned at the bottom of the article in the "Thoughts" section: You could certainly use self modifying code and unro
by js2 4y ago
> This also misses loop unrolling.
It's mentioned at the bottom of the article in the "Thoughts" section:
You could certainly use self modifying code and unroll this copy routine to get better performance at the price of flexibility and arguably understanding for the average casual 6502 assembly coder. Again, this was not a "how fast can we absolutely make it" but an everyday use examination.
- hinkley 4y agoDuff's device is a fixed size loop unrolling with an ugly hack to make it behave for arbitrary inputs. The assembly makes sense but the C code is rough. It's not quite as fast as self-modifying or custom compiled code, but it's pretty close.