2 ms·
Duff'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 n
by hinkley 4y ago
Duff'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.