Please try and post your result !

BlitzMax Forums/BlitzMax Programming/Please try and post your result !

Eole(Posted 2005) [#1]
Hi evrey body

In the french community, we re testing the performance between Bmax and Blitz3D. But we find some differents result. Some guy find that Bmax is more power and another find that Blitz3D is more power ...

You can try this little example in Bmax and B3D and give us you re result thank

t#=MilliSecs()

For i=0 To 10000000
    
    result# =    Cos(i) ^Cos(i)
Next

Print Float(MilliSecs()-t#)/1000


off course en blitz3d add waitkey


Robert(Posted 2005) [#2]
Have you compiled with the latest version of BlitzMAX? Older versions had a very slow ^ operator.


Extron(Posted 2005) [#3]
4.88 with Blitz3D
4.61499977 with BlitzMax core 1.03


ftbass(Posted 2005) [#4]
the tests were realized with BMax 1.3, every modules synchronized...
just need results :)

see ya


ftbass(Posted 2005) [#5]
2.9 with Blitz3d
3.8 with BlitzMax

debug mode disabled on both


AntonyWells(Posted 2005) [#6]
Bmax:45Fps
B3D:<1fps.

Real world tests show the true speed of max.


N(Posted 2005) [#7]
BlitzMax: 4.11899996

Blitz3D: 3.461

Interesting. Using Core 1.03.


Tom(Posted 2005) [#8]
speed != power

show me the flexibility test :)


Tom(Posted 2005) [#9]
Sorry, meant to edit my post!

2.79 b3d
3.76 max


nawi(Posted 2005) [#10]
Maybe try adding delay 2000 and something, and btw those should not be made with win32 becose its beta state and everything. Also, window size and fullscreen/window mode has noticable effect on B3D speed.


Perturbatio(Posted 2005) [#11]
B3D: 3.05
BMax Win32 Beta : 3.9


N(Posted 2005) [#12]
and btw those should not be made with win32 becose its beta state and everything.


Uh.. yeah, right...


ImaginaryHuman(Posted 2005) [#13]
AND shouldn't you be using Local variables in BlitzMax? I know that doesn't make for a direct translation between the two languages but hey, if you're supposed to do things differently then that's what you gotta do!


N(Posted 2005) [#14]
AngelDaniel: Variables are local unless declared otherwise.


Perturbatio(Posted 2005) [#15]
Ok, a little weirdness here, implicitly declaring the variables as Local speeds it up a little, putting strict in slows it down slightly (but still faster than the code at the top of this thread).
Strict
Local t#=MilliSecs()

For Local i=0 To 10000000
    
    Local result# =    Cos(i) ^Cos(i)
Next

Print Float(MilliSecs()-t#)/1000 


After 3 runs:
With strict: approx 3.8
Without strict: approx 3.6

*EDIT*

I just tried it again and with strict was slightly faster this time.


John Pickford(Posted 2005) [#16]
This code is so trivial it's meaningless as a benchmark. Both compilers should be able to generate efficient code for a for-next loop. And the rest of the time will just be a handful of floating point instructions.

Try a meatier bit of code and watch Bmax race ahead.


Kanati(Posted 2005) [#17]
2.50799990

For what it's worth.


erwan(Posted 2005) [#18]
blitz3d v1.88 (windows xp sp2) : 8.786
blitzmax win v1.03 (windows xp sp2) : 7.61299992
blitzmax linux v1.03 (fedora core 3) : 6.77899981
blitzmax linux v1.03 (mandrake 10.1) : 5.66599989


ImaginaryHuman(Posted 2005) [#19]
"Variables are local unless declared otherwise." ... then there would be no point in the existence of the `Local` token. I always thought variables are held in memory unless defined as a Local. I know Globals are in memory but I thought other variables are too?


FlameDuck(Posted 2005) [#20]
then there would be no point in the existence of the `Local` token.
Strict mode explicit variable declaration. BlitzMAX uses scope, not type as an explicit variable declaration.


N(Posted 2005) [#21]
... then there would be no point in the existence of the `Local` token.


Strict mode explicit variable declaration.


Da-ding.


JoJo(Posted 2005) [#22]
PII 400mhz
19.8 secs

P4 1.7ghz
10.88 secs


PowerPC603(Posted 2005) [#23]
BMax (core 1.03): 6.07999992
BMax (core 1.03): 6.32200003 (using strict)
B3D: 6.977


then there would be no point in the existence of the `Local` token.


Yep, there is:
a[] = [1,2,3] ' Generates error: "Expecting expression but encountered '='
Local b[] = [1,2,3] ' Works fine

This code is run without Strict (this is the entire code).


Jeroen(Posted 2005) [#24]
BlitzMax Non-Strict (1.03): 4.96199989
BlitzMax Strict (1.03): 4.93800020
Blitz3D: (1.88): 5.173


Eole(Posted 2005) [#25]
It's very strange ...


xlsior(Posted 2005) [#26]
Since people are getting mixed results, how about this:

Is there any correlation between whether people use an AMD Athlon CPU vs. Intel Pentium?

Both CPU architectures have different internal optimizations, and it's possible that a change in the algorithms for certain operations between BlitzMax and B3D may be either more or less efficient depending on the CPU used.


Beaker(Posted 2005) [#27]
Why are you even worried about this? It's just splitting hairs. I'd understand you worrying about drawing speed, or the speed of the forthcoming 3D module, but not this!