Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
optimised INCR & DECR variable
#1
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 Smile.
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
Reply
#2
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.
INCR variable increases the value by one. This will be very handy, I think Smile.
Well, using -O3 should convert variable=variable+1 to inc(variable). If not, its something to be done.
Reply
#3
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.
INCR variable increases the value by one. This will be very handy, I think Smile.
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)...
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)