FAQ  •  Register  •  Login

optimised INCR & DECR variable

<<

LCD

Posts: 571

Joined: Fri Feb 13, 2009 3:11 pm

Location: Vienna, Austria

Post Mon May 11, 2009 10:02 pm

optimised INCR & DECR variable

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 :).
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
<<

boriel

Site Admin

Posts: 1278

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Tue May 12, 2009 12:04 am

Re: optimised INCR & DECR variable

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 :).

Well, using -O3 should convert variable=variable+1 to inc(variable). If not, its something to be done.
<<

LCD

Posts: 571

Joined: Fri Feb 13, 2009 3:11 pm

Location: Vienna, Austria

Post Tue May 12, 2009 2:39 pm

Re: optimised INCR & DECR variable

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 :).

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!

Return to Wishlist

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.

phpBB SEO