Testing Speed...

BlitzMax Forums/BlitzMax Beginners Area/Testing Speed...

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.

If it's a straight 2 methods compare use ms although you might have to test it in a loop. Gab is right about 'silly' tests but take a good guess how often you're likely to call a method.
It's easy to keep adding 0s to a loop and be happy when there's a couple of ms difference when you get up to millions.
Alternatively, use/create a profiler like this .
Finally, taken into account things like readability, maintainability, portability and robustness. Unless you're REALLY looking for speed doing something a nice way can be worth a couple of ms when compared with doing something a quick but horribly complex way.