Hmm, which is faster?

BlitzMax Forums/BlitzMax Programming/Hmm, which is faster?

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.

I would think also the local version is always going to be faster because it will keep the data in the cpu register where possible and not even access main memory or cache. To get access to the the field in the type, Blitz at a low level has to get the pointer to the type and then add an offset to it to get to the field and then read the field, versus reading it straight from a register, so it's likely to be faster just to use a local, as test results imply.

Putting something into object orientation and into a type and making fields is all nice and pretty. It's good for *spacial organization*, but is it not necessarily the best solution for *temporarl organization* ie making best use of time. Oop is not usually as efficient, for most things, as procedural code or good use of locals.