Anyone's afraid of BlitzMax speed?
Well, I don't think you'll have to sacrifice small filesize in favour of speed. Look at the BBP benchmark. PB is faster here AND produces a executable that is far beyond everything BMX could dream of. I really believe the random command of PB is slower. Other possibility: typecasting is faster in BMX. I think that's subject to check 

ATCFCR benchmark
PureBasic - V4.00beta7 - Size: 10.5KB
Random benchmark : Time: 1547 m/secs
XXX -> String :: Time: 6843 m/secs
XXX -> Double :: Time: 2188 m/secs
XXX -> Quad :: Time: 109 m/secs
XXX -> Float :: Time: 2156 m/secs
XXX -> Long :: Time: 47 m/secs
BlitzMax - V1.12demo - Size: 52.5KB
Random benchmark : Time: 1351 m/secs
XXX -> String :: Time: 4055 m/secs
XXX -> Double :: Time: 848 m/secs
XXX -> Quad :: Time: 96 m/secs
XXX -> Float :: Time: 834 m/secs
XXX -> Long :: Time: 64 m/secs
Boom, that's quite a surprise. So typecasting (and maybe function calls) are faster in BMX. I added the test in the zip file you can find here: http://www.kudoscry.com/public/test.zip
Seems that PB loses
PureBasic - V4.00beta7 - Size: 10.5KB
Random benchmark : Time: 1547 m/secs
XXX -> String :: Time: 6843 m/secs
XXX -> Double :: Time: 2188 m/secs
XXX -> Quad :: Time: 109 m/secs
XXX -> Float :: Time: 2156 m/secs
XXX -> Long :: Time: 47 m/secs
BlitzMax - V1.12demo - Size: 52.5KB
Random benchmark : Time: 1351 m/secs
XXX -> String :: Time: 4055 m/secs
XXX -> Double :: Time: 848 m/secs
XXX -> Quad :: Time: 96 m/secs
XXX -> Float :: Time: 834 m/secs
XXX -> Long :: Time: 64 m/secs
Boom, that's quite a surprise. So typecasting (and maybe function calls) are faster in BMX. I added the test in the zip file you can find here: http://www.kudoscry.com/public/test.zip
Seems that PB loses

Please use high resolution timers for benchmarks... Even if they have lots of iterations.
Secondly, some operations like SHL and SHR in Intel processors are slower than on AMDs. The same case happens with other instructions believe it or not.
On the other hand, for real benchmarks you should run a test at least 10 times, then take the average of the results
.
Also don't forget to run them at the same conditions (as much as possible).
Finally: BMX is bloated crap, in my opinion. I really wont believe its any faster. However, again... BMX is just to me, a language parser and some open-sourced libraries (hey, which in that case is good to have the source of a lib, that case you dont depend on the author, although I guess compile times would be a little slower?)... Also, is the demo any different from the retail product?. Benchs should be done with both retail and not with one demo and a retail, etc. IMO.
Secondly, some operations like SHL and SHR in Intel processors are slower than on AMDs. The same case happens with other instructions believe it or not.
On the other hand, for real benchmarks you should run a test at least 10 times, then take the average of the results

Also don't forget to run them at the same conditions (as much as possible).
Finally: BMX is bloated crap, in my opinion. I really wont believe its any faster. However, again... BMX is just to me, a language parser and some open-sourced libraries (hey, which in that case is good to have the source of a lib, that case you dont depend on the author, although I guess compile times would be a little slower?)... Also, is the demo any different from the retail product?. Benchs should be done with both retail and not with one demo and a retail, etc. IMO.
-
- Addict
- Posts: 1126
- Joined: Wed Oct 15, 2003 12:40 am
- Location: Sweden
- Contact:
ATCFCR benchmark
PureBasic - V4.00beta7 - Size: 10.5KB
Random benchmark : Time: 1422 m/secs
XXX -> String :: Time: 8963 m/secs
XXX -> Double :: Time: 3104 m/secs
XXX -> Quad :: Time: 180 m/secs
XXX -> Float :: Time: 3045 m/secs
XXX -> Long :: Time: 90 m/secs
BlitzMax - V1.18 (retail) - Size: 55.5KB
Random benchmark : Time: 1365 m/secs
XXX -> String :: Time: 5013 m/secs
XXX -> Double :: Time: 1070 m/secs
XXX -> Quad :: Time: 163 m/secs
XXX -> Float :: Time: 1041 m/secs
XXX -> Long :: Time: 69 m/secs
Pentium M 1.70 GHz, 2 GB RAM (heavy loaded, 93 processes)
PureBasic - V4.00beta7 - Size: 10.5KB
Random benchmark : Time: 1422 m/secs
XXX -> String :: Time: 8963 m/secs
XXX -> Double :: Time: 3104 m/secs
XXX -> Quad :: Time: 180 m/secs
XXX -> Float :: Time: 3045 m/secs
XXX -> Long :: Time: 90 m/secs
BlitzMax - V1.18 (retail) - Size: 55.5KB
Random benchmark : Time: 1365 m/secs
XXX -> String :: Time: 5013 m/secs
XXX -> Double :: Time: 1070 m/secs
XXX -> Quad :: Time: 163 m/secs
XXX -> Float :: Time: 1041 m/secs
XXX -> Long :: Time: 69 m/secs
Pentium M 1.70 GHz, 2 GB RAM (heavy loaded, 93 processes)

(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
I've extracted this from one of the Sebe's comparations:
PB
vs BMX
@Sebe, where is the 18 decimals limitation in the MBX version ???
does StringArray[Iter] contain a string after that functions is performed in BMX??
Else, you are lieing to all of us, and we must not listen you anymore
PB
Code: Select all
Procedure Float2String()
For Iter = 0 To 999999
StringArray(Iter) = StrF(FloatArray(Iter), 18)
Next
EndProcedure
Code: Select all
Function Float2String()
For Iter = 0 To 999999
StringArray[Iter] = FloatArray[Iter]
Next
End Function

does StringArray[Iter] contain a string after that functions is performed in BMX??

Else, you are lieing to all of us, and we must not listen you anymore

Floats/Doubles in strings are handled at 18 decimals in BMXwhere is the 18 decimals limitation in the MBX version


It does (or according to the CRAPPY helpfile of BMX it should). [ANY TYPE] -> String is performed automatic by BMX while String -> [ANY TYPE] must be made manual.does StringArray[Iter] contain a string after that functions is performed in BMX??
I was just wondering about some of the test results and I'll try to find the reasons.
My first approach is called FuCa. It's a simple FunctionCall Benchmark and I've added it here: http://www.kudoscry.com/public/test.zip
First test results:
FuCa Benchmark
PureBasic - V4.00beta7 - Size: 4.5KB
Time for 1000000000 function calls: 9047 m/secs
BlitzMax - V1.12demo - Size: 48.5KB
Time for 1000000000 function calls: 18426 m/secs
So PB is roughly 2 times as fast as BMX speaking of pure (LOL) function calls. Next stop will be arrays. I have a funny feeling that it's the arrays that are faster in BMX

- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
I'm curious: Would someone please explain what's the use of knowing what
language performs better in what situation? Is the purpose something like
getting a justification for having spent money on a certain product?
language performs better in what situation? Is the purpose something like
getting a justification for having spent money on a certain product?
Good programmers don't comment their code. It was hard to write, should be hard to read.
-
- Enthusiast
- Posts: 468
- Joined: Sat Dec 20, 2003 6:19 pm
- Location: Switzerland
What question...
Btw:
Actually seems not bad, does it? Perhaps the PUSH and POP could be
eliminated.
A bit harder to do:
I'm always for speeding up the executable!

Btw:
Code: Select all
; ab(5) = 7
MOV ebp,dword [a_ab]
MOV dword [ebp+20],7
; ab(5) = c
PUSH dword [v_c]
POP dword [ebp+20]
; ab(d) = 8
MOV ebx,dword [v_d]
SAL ebx,2
MOV dword [ebp+ebx],8
; ab(d) = c
PUSH dword [v_c]
MOV ebx,dword [v_d]
SAL ebx,2
POP dword [ebp+ebx]
eliminated.
A bit harder to do:
Code: Select all
; k = ab(d) * ab(d)
MOV ebx,dword [v_d]
SAL ebx,2
MOV ebx,dword [ebp+ebx]
MOV edi,dword [v_d]
SAL edi,2
IMUL ebx,dword [ebp+edi]
MOV dword [v_k],ebx
Athlon64 3700+, 1024MB Ram, Radeon X1600
I think its more of a "mine is bigger than yours" sort of thingI'm curious: Would someone please explain what's the use of knowing what
language performs better in what situation? Is the purpose something like
getting a justification for having spent money on a certain product?

quidquid Latine dictum sit altum videtur