Order loading vars
T Chap
Posts: 4,223
While working on a big program, I started getting strange crashes and behavior that didn't make sense. The program was compiling somewhere around 7500. I started cleaning things up and getting rid of unused declared vars, shrinking some stack space and got the program running fine. I also organized the declared vars in the order:
Long arrays and stack space
Longs
Word arrays
Words
Byte arrays
Bytes.
I am not sure this type of organization offers any benefit actually, but thought I had read about organizing declarations from largest to smallest somewhere before.
Has anyone heard of such an order of declared vars being of any benefit? My goal is to avoid problems as the program gets larger. So I am looking for optimization tricks.
Post Edited (TChapman) : 5/25/2009 4:29:29 AM GMT
Long arrays and stack space
Longs
Word arrays
Words
Byte arrays
Bytes.
I am not sure this type of organization offers any benefit actually, but thought I had read about organizing declarations from largest to smallest somewhere before.
Has anyone heard of such an order of declared vars being of any benefit? My goal is to avoid problems as the program gets larger. So I am looking for optimization tricks.
Post Edited (TChapman) : 5/25/2009 4:29:29 AM GMT
Comments
-Phil