Longer reply coming; I'm benchmarking. But the tl;dr is that damn it, you may be right and I've wasted several days of effort. :-(
I can even shave a few cycles (and one instruction) off of your code. At less than half the size and slightly better than half the speed, it's hard to argue with. While the optimal tradeoff depends on the application, and all we can be sure of is that it's somewhere on the convex hull of the space/time plot, optimizing time^k * space for some exponent k is usually good, and you're beating me with k=1. _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/avr-libc-dev