Hi!
Variable or Variable%... Which is faster?
In only need numbers 0-255.
:giveup:
Integers are usually slightly faster, esp. on mobile platforms but most modern CPUs have excellent FPUs for dealing with floats, so its not easy to give a definitive answer. Also, if it needs a lot of integer, float type conversions later in the program, any gain could easily be lost. I use var% for loops, iterators, indexers etc. and try to keep it as a good habit but I always keep one eye on these variables to see if they are sharing values with floats at a later point.
BTW, I suppose you could use the C type "char" to store just a byte(eg: "var AS char"), it's not a documented feature but GLBasic can use some other non-standard basic types IIRC.
Both measurements and opinions are invalid - measurements change between machines and opinions always differ :D :P
Just do what works for you on your machine and hope that it does something similar on everyone else's! ;) :P
Well, I certainly don't see how ints could be slower than floats, so I guess why not. That being said I bet there are other areas in your code which may be more meaningful to optimize.