Please try and post your result !
BlitzMax Forums/BlitzMax Programming/Please try and post your result !
| ||
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 |
| ||
Have you compiled with the latest version of BlitzMAX? Older versions had a very slow ^ operator. |
| ||
4.88 with Blitz3D 4.61499977 with BlitzMax core 1.03 |
| ||
the tests were realized with BMax 1.3, every modules synchronized... just need results :) see ya |
| ||
2.9 with Blitz3d 3.8 with BlitzMax debug mode disabled on both |
| ||
Bmax:45Fps B3D:<1fps. Real world tests show the true speed of max. |
| ||
BlitzMax: 4.11899996 Blitz3D: 3.461 Interesting. Using Core 1.03. |
| ||
speed != power show me the flexibility test :) |
| ||
Sorry, meant to edit my post! 2.79 b3d 3.76 max |
| ||
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. |
| ||
B3D: 3.05 BMax Win32 Beta : 3.9 |
| ||
and btw those should not be made with win32 becose its beta state and everything. Uh.. yeah, right... |
| ||
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! |
| ||
AngelDaniel: Variables are local unless declared otherwise. |
| ||
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. |
| ||
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. |
| ||
2.50799990 For what it's worth. |
| ||
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 |
| ||
"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? |
| ||
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. |
| ||
... then there would be no point in the existence of the `Local` token. Strict mode explicit variable declaration. Da-ding. |
| ||
PII 400mhz 19.8 secs P4 1.7ghz 10.88 secs |
| ||
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). |
| ||
BlitzMax Non-Strict (1.03): 4.96199989 BlitzMax Strict (1.03): 4.93800020 Blitz3D: (1.88): 5.173 |
| ||
It's very strange ... |
| ||
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. |
| ||
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! |