Posted: Wed Mar 22, 2006 8:50 pm
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)
http://www.purebasic.com
https://www.purebasic.fr/english/
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)
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
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
What's the point with fast iterations if the result isn't correct? These tests don't tell a thing if they don't produce the same results imho!Sebe wrote:PB. The floats and doubles in BMX are not as preciseLook at the BBP test to see that.
Sebe wrote:Well, it's a speed test. But you're right, we need some accuracy tests...
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.
Code: Select all
DOTX * DOTX + DOTY * DOTY
Code: Select all
Pow(DOTX, 2.0) + Pow(DOTY, 2.0)
Code: Select all
PB: 7188 ms
BMX: 4925 ms
Code: Select all
PB: 1141 ms (5 times faster!)
BMX: 4925 ms
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"