Re: [cc65] Optimizations needed!

From: <>
Date: 2010-11-26 13:19:09
In a message dated 11/26/2010 4:27:38 A.M. Eastern Standard Time, writes:

1. Don't  use structs. Generated code is terrible.
I will work on  that.

2.  Use arrays of size <256

3.  Use global variables instead of stack variables.
I'm doing that in some instances.

4.  Try not to pass parameters to functions - used global data.
True.  Thank you.

5.  Load data from disk when necessary.
The only things I can load from disk are strings.

6.  Split your game into separate parts that don't share data.
I could probably do that, but all pieces would have to share the same code, 
 making such infeasible..  

7.  Don't use macros.
I'm not--much.

8.  Use unsigned chars instead of ints wherever possible.
I did.

9.  Never use printf. The library code to handle it is huge. Write your own 
 functions to display text/number.

I need printf() for some functionality, but I use puts() when  necessary.


Joseph Rose, a.k.a. Harry Potter
Working  magic in the computer community...or at least striving to!  :(
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Nov 26 13:19:20 2010

This archive was generated by hypermail 2.1.8 : 2010-11-26 13:19:24 CET