f98642e44a
* BUG: Be more intelligent when parsing arguments. Now all arguments after the first non option argument are sent to the script process. [INTERPRETER] * OPT: Remove a previous optimization that made benchmarks slower, contrary to what valgrind tells. No idea why exactly, maybe a valgrind cache simulation problem. [BENCHMARKS] * NEW: Do less in the polynom benchmark, so that it runs about as long as the other benchmarks. git-svn-id: svn://localhost/gambas/trunk@6621 867c0c6c-44f3-4631-809d-bfa615b0a4ec
33 lines
435 B
Text
Executable file
33 lines
435 B
Text
Executable file
#!/usr/bin/env gbs3
|
|
|
|
Sub Test(X As Float) As Float
|
|
|
|
Dim Mu As Float = 10.0
|
|
Dim Pu, Su As Float
|
|
Dim I, J, N As Integer
|
|
Dim aPoly As New Float[100]
|
|
|
|
N = 500000
|
|
|
|
For I = 0 To N - 1
|
|
For J = 0 To 99
|
|
Mu = (Mu + 2.0) / 2.0
|
|
aPoly[J] = Mu
|
|
Next
|
|
Su = 0.0
|
|
For J = 0 To 99
|
|
Su = X * Su + aPoly[J]
|
|
Next
|
|
Pu += Su
|
|
Next
|
|
|
|
Return Pu
|
|
|
|
End
|
|
|
|
Dim I as Integer
|
|
|
|
For I = 1 To 4
|
|
Print Test(0.2)
|
|
Next
|
|
|