fachat wrote:
On the other hand, when I have an optimized library routine this uses zeropage and you'd have to copy data there.
Yeah, so you're doing the kind of opmization that I'd think a really good compiler would also do: it would look at the particular bits of data being used and decide whether it's worth copying things down to (and possibly back up from) the zero page, or whether the overhead of that wouldn't be justified. Only it might change that back and forth from build to build, always using the fastest method, whereas human programmers tend not to be quite so ferocious about optimization.
Quote:
I'd keep the "fast variables" in zeropage, without needing to copy them back and forth. Maybe there is a way to "pin" these "registers" so backing storage in 16bit is not needed?
Again, I'd think the optimizer would do exactly that.