how fast to 1 Billion ?

BlitzMax Forums/BlitzMax Beginners Area/how fast to 1 Billion ?

With Wiering's code, on my Athlon 3000+ under Win XP Pro SP2:

1465 BlitzMax 1.10


With the required, minor adjustments:

2061 Blitz3D 1.90


In both BlitzMax and Blitz3D, it makes no difference using While/Wend or For/Next, or whether the program was run in the IDE or as an Exe (both with no debug).


Curious, I tried my older, Microsoft Basics (code adjusted as needed). With them, there are differences between running in their IDE or as a compiled Exe, as well as using a While/Wend loop or a For/Next one.

I was surprised to see that compiled VB 5 (1997) is slightly faster than Blitz3D (though not as fast as BlitzMax):

In IDE:
67343 Visual Basic 5.0 SP3 (While/Wend)
12343 Visual Basic 5.0 SP3 (For/Next)

Compiled as Exe:
1921 Visual Basic 5.0 SP3 (While/Wend)
1734 Visual Basic 5.0 SP3 (For/Next)


And then there's good ol' QuickBASIC from 1988 <g>:

In IDE:
109296 QuickBASIC 4.5 (While/Wend)
51132 QuickBASIC 4.5 (For/Next)

Stand-alone Exe (no debug):
33007 QuickBASIC 4.5 (While/Wend)
32507 QuickBASIC 4.5 (For/Next)