Macros?

BlitzMax Forums/BlitzMax Beginners Area/Macros?

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.

Optimise your algorithm NOT your code. Let the compiler worry about code optimisation.

You can optimise the code for a bubble sort as much as you like but there are other techniques that are fundamentally faster.

I came to this philosophy after many years of assembler programming. I've counted clock-cycles, unrolled loops, self-modified code, used un-documented opcodes and switched instruction order in my time. Ultimately, on modern hardware at least, it's pointless excercise. The time is bettter spent looking at your overall program flow and algorithms.