![]() |
|
optimised INCR & DECR variable - Printable Version +- Boriel Basic Forum (https://forum.boriel.com) +-- Forum: Compilers and Computer Languages (https://forum.boriel.com/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://forum.boriel.com/forumdisplay.php?fid=11) +---- Forum: Wishlist (https://forum.boriel.com/forumdisplay.php?fid=14) +---- Thread: optimised INCR & DECR variable (/showthread.php?tid=108) |
optimised INCR & DECR variable - LCD - 2009-05-11 Because I also coded some stuff in AMOS on Amiga: How about optimised INCR and DECR commands for variables? This can be easyly optimised because Z80 knows INC and DEC commands, and variable=variable+1 is maybe much slower. INCR variable incrases the value by one. This will be very handy, I think .
Re: optimised INCR & DECR variable - boriel - 2009-05-12 LCD Wrote:Because I also coded some stuff in AMOS on Amiga: How about optimised INCR and DECR commands for variables? This can be easyly optimised because Z80 knows INC and DEC commands, and variable=variable+1 is maybe much slower.Well, using -O3 should convert variable=variable+1 to inc(variable). If not, its something to be done. Re: optimised INCR & DECR variable - LCD - 2009-05-12 boriel Wrote:LCD Wrote:Because I also coded some stuff in AMOS on Amiga: How about optimised INCR and DECR commands for variables? This can be easyly optimised because Z80 knows INC and DEC commands, and variable=variable+1 is maybe much slower.Well, using -O3 should convert variable=variable+1 to inc(variable). If not, its something to be done. Aha, thank you, I was compiling with -O2 (forgot to change again after changing for a little test)... |