what functions are missing?dagcrack wrote:...math routines in PB - (even today they are lacking, and yes, they are a must if you ask me)
Anyone's afraid of BlitzMax speed?
Void.
Last edited by Max. on Thu Apr 06, 2006 5:48 pm, edited 1 time in total.
Athlon64 3800+ · 1 GB RAM · Radeon X800 XL · Win XP Prof/SP1+IE6.0/Firefox · PB 3.94/4.0
Intel Centrino 1.4 MHz · 1.5 GB RAM · Radeon 9000 Mobility · Win XP Prof/SP2+IE6.0/Firefox · PB 3.94/4.0
Intel Centrino 1.4 MHz · 1.5 GB RAM · Radeon 9000 Mobility · Win XP Prof/SP2+IE6.0/Firefox · PB 3.94/4.0
The last benchmark for this week, I've put almost 5 hours in the PB and BMX ports of the C source. It's the famous Whetstone benchmark and I really expected to be PB slightly faster then BMX. Grab the files here: http://www.kudoscry.com/public/test.zip
Here are my results:
WhetMax - V1.12demo - Size: 86.5KB
PureWhet - V4.00beta7 - Size: 17KB
No comment on this one, I'm a little bit disappointed. Not of PB or the team or Fred. PB is still as fast as C (and the C bench used single precision!) but I really didn't expect to see BMX ahead. Still: I again realized that coding PB is much more comfortable (and logical) than coding BMX 
Some information about the test:
N1: Simple calcs with double type arrays
N2: Passing arrays as function parameter
N3: Conditional jumps
N4: Integer arithmetic
N5: Trigonom. functions
N6: Procedure calls (passing integer vars and pointers of double vars)
N7: Array references
N8: Standard math functions
Here are my results:
WhetMax - V1.12demo - Size: 86.5KB
Code: Select all
Date March 23th, 2006
Model x64
CPU AMD Athlon64 3.500+ Venice
Clock MHz 2.200 MHz
Cache 1024 MB
H/W options ----
OS WindowsXP Professional SP2
Compiler BlitzMax
Run by Sebe
Website www.kudoscry.com
Email sebe[at]kudoscry.com
Loop content Result MFLOPS MOPS Seconds
N1 floating point -1.1333333423928149 401.738 0.492
N2 floating point -1.1333333028508248 307.366 4.506
N3 if then else 1.0000000000000000 657.158 1.622
N4 fixed point 12.000000000000000 -321.943 3.257
N5 sin,cos etc. 0.50000002270777300 32.212 26.615
N6 floating point 0.95218875631952249 40.690 31.052
N7 assignments 3.0000000000000000 330.618 5.7599
N8 exp,sqrt etc. 0.75190779087935466 14.693 26.090
MWIPS: 1036.735 Time: 99.398 Seconds
Results to load to spreadsheet MWIPS Mflops1 Mflops2 Mflops3 Cosmops Expmops Fixpmops Ifmops Eqmops
Results to load to spreadsheet 1036.735 401.738 307.366 40.690 32.212 14.693 -321.943 657.158 330.618
PureWhet - V4.00beta7 - Size: 17KB
Code: Select all
Date March 23th, 2006
Model x64
CPU AMD Athlon64 3.500+ Venice
Clock MHz 2.200 MHz
Cache 1024 MB
H/W options ----
OS WindowsXP Professional SP2
Compiler Pure Basic
Run by Sebe
Website www.kudoscry.com
Email sebe[at]kudoscry.com
Loop content Result MFLOPS MOPS Seconds
N1 floating point -1.13333334264883060 262.673 0.586
N2 floating point -1.13333330113013850 201.663 5.343
N3 if then else 1.00000000000000000 421.412 1.969
N4 fixed point 12.00000000000000000 600.846 4.203
N5 sin,cos etc. 0.50000005916892443 40.929 16.297
N6 floating point 1.00000000000000000 127.834 33.828
N7 assignments 3.00000000000000000 102.508 14.453
N8 exp,sqrt etc. 0.75221521343150866 13.046 22.860
MWIPS: 805.413 Time: 99.539 Seconds
Results to load to spreadsheet MWIPS Mflops1 Mflops2 Mflops3 Cosmops Expmops Fixpmops Ifmops Eqmops
Results to load to spreadsheet 805.413 262.673 201.663 127.834 40.929 13.046 600.846 421.412 102.508

Some information about the test:
N1: Simple calcs with double type arrays
N2: Passing arrays as function parameter
N3: Conditional jumps
N4: Integer arithmetic
N5: Trigonom. functions
N6: Procedure calls (passing integer vars and pointers of double vars)
N7: Array references
N8: Standard math functions
Sebe wrote:PB. The floats and doubles in BMX are not as preciseLook at the BBP test to see that.
http://www.purebasic.fr/english/viewtop ... c&start=60Psychophanta wrote:First one:
Trigonometric functions returned by blitzmax are returned as double float, but only the first 8 (sometimes 6) decimals are true, the other 10 (or more) are literally invented
I guess it has a table of results used to deliver some math functions.
Clearly this language is only focused for games
I have a sneaking suspicion along with Psychophanta that BMX makes heavy use of precalculated math values at a very low precision for maximum speed, skewing any benchmarking.
I have a sneaking suspicion along with Psychophanta that BMX makes heavy use of precalculated math values at a very low precision for maximum speed, skewing any benchmarking.



gfa had sin and sinq commands for speed purposes
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
Please check in MonteCarlo the calculation of radius!
BlitzBasic:
PureBasic:
That's unfair to PB!
Same conditions for all!
So far (10.000.000 drops and float):
Change the calculation in PB to DOTX * DOTX + DOTY * DOTY, like Blitz:

---------------------
And please get the time in Blitz after the loop (like PB) and not after the console-output. At the moment it's unfair to BlitzBasic:
PB:
Blitz:
BlitzBasic:
Code: Select all
DOTX * DOTX + DOTY * DOTY
Code: Select all
Pow(DOTX, 2.0) + Pow(DOTY, 2.0)

So far (10.000.000 drops and float):
Code: Select all
PB: 7188 ms
BMX: 4925 ms
Code: Select all
PB: 1141 ms (5 times faster!)
BMX: 4925 ms

---------------------
And please get the time in Blitz after the loop (like PB) and not after the console-output. At the moment it's unfair to BlitzBasic:
PB:
Code: Select all
t = GetTickCount_() - t
PrintN("PI (" + Str(total) + " drops) on float: " + StrF(PI, 18))
PrintN("Time needed: " + Str(t) + " m/secs")
Code: Select all
Print "PI (" + String(total) + " drops) on float: " + String(MYPI)
Print "Time needed: " + (MilliSecs() - t) + " m/secs"