Best way to calc next ^2 value...

Blitz3D Forums/Blitz3D Programming/Best way to calc next ^2 value...

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.

However after subtracting the loop and call overhead shown by test_empty(), I believe that there is significant variation in the other functions compared to test_int.


Keep in mind that there's going to be a certain percentage of error involved testing in a multitasking operating system. Since your machine is much faster than mine, you might want to increase your iterations to help compensate for this.

I found that whatever test I was running first was registering as slower than the rest. Adding Delay(1000) to the start of the program solved this for me. This didn't seem to be a problem for your first test's result, but I recommend you try this to see if it effects your other results.

When I run your code here, I see consistantly similar times for int, shl, float, constmath, and empty. The range was 1762ms to 1790ms.

What version of Blitz are you using? You aren't testing this with BlitzMax, are you?