Hi,
maybe someone can help me out here. I did a small research testing the speed of different programming languages. It's only a very small math test, but it's results surprised me a little.
This is the Blitzmax version, coded very quickly and dirty
When I enter 10000 then on my older pc it takes 16 seconds.
Now it comes, here are the comparisons:
Delphi: 8,6 Seconds (first run 10secs)
Java 1.6: 1 Min 40 Seconds!! hotspot was on I think
c# : 9 Seconds
purebasic: 8 seconds
Blitzmax: 16 seconds
And that's what I don't understand, my guess would have been that pb and BMax should have been equal.
On a side not but irrelevant for the results, I created a nice form for delphi,Java and c#.
And yes, the debugger was deactivated.
And please, this little benchmark is only a little test for me to check out the math speed and the implementation in different languages and has nothing to do with the practical speed of a whole application., so no flames about better languages or so.
I only want to know why BMax needs 16 seconds where pb only needs 8. Where can I optimize. I used that same formula in every other language.
Best regards
B.
maybe someone can help me out here. I did a small research testing the speed of different programming languages. It's only a very small math test, but it's results surprised me a little.
This is the Blitzmax version, coded very quickly and dirty
Global Anzahl, Iterationenl, EndTime, StartTime,i : Long Global Sekunden, Minuten, Stunden, DauerMsec,x,y : Double Anzahl = Long ( Input("Anzahl Clients: ")) Iterationen = ((Anzahl-1)*Anzahl/2) EndTime = MilliSecs() For i = 0 To Iterationen y = Sin(i) x = Cos(y) x = x*y Next StartTime = MilliSecs() Print "Anzahl: " + String(Anzahl) Print "Iterationen: " + String(Iterationen) DauerMsec = StartTime - EndTime Print "Millisekunden: " + String.FromDouble(DauerMsec) Print "Sekunden: " + String.FromDouble(DauerMsec/1000)
When I enter 10000 then on my older pc it takes 16 seconds.
Now it comes, here are the comparisons:
Delphi: 8,6 Seconds (first run 10secs)
Java 1.6: 1 Min 40 Seconds!! hotspot was on I think
c# : 9 Seconds
purebasic: 8 seconds
Blitzmax: 16 seconds
And that's what I don't understand, my guess would have been that pb and BMax should have been equal.
On a side not but irrelevant for the results, I created a nice form for delphi,Java and c#.
And yes, the debugger was deactivated.
And please, this little benchmark is only a little test for me to check out the math speed and the implementation in different languages and has nothing to do with the practical speed of a whole application., so no flames about better languages or so.
I only want to know why BMax needs 16 seconds where pb only needs 8. Where can I optimize. I used that same formula in every other language.
Best regards
B.