Optimazion issues... Whats with BlitzMax?!

BlitzMax Forums/BlitzMax Programming/Optimazion issues... Whats with BlitzMax?!

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

By the way, optimisation is generally done with small steps and not major ones, and it is pretty much impossible to tell what to optimize without seeing the code. I used to code a demo or two with old blitzbasic and you can easily double or triple your fps if you care enough. General tips:
-Don't calculate values that you can precalculate (for example before a loop, don't test (while t < func(x)), instead use (s = func(x); while t < s) etc.
-Precalculate mathematic functions like sin,cos,tan to a table.
-Using multi-dimensional arrays was dog-slow in old blitz, and probably in BlitzMax too. Use a single dimensional (or possibly memorybanks, but I haven't tested their speed in BlitzMax)
-Using a function in a loop makes the code more readable, but you will lose some speed. (Often optimization is balancing between readability and speed. In this case prefer speed!)
-Don't use floats if you can use integers instead.
-Use a single loop instead of multiple nested loops where possible. Calculate the reading from and array etc by hand.
-Etc