Do you have the keyword "Fast" at the beginning?

How long did it take to run the code? A minute or a few seconds?

2012/5/24 Ru Vuott <vu...@yahoo.it>

>
> >
> > > Try to run the benchmark
> > > http://gambasdoc.org/help/doc/benchmark/polynom
> > > <http://gambasdoc.org/help/doc/benchmark/polynom>and
> >
>
>
> I wrote it:
>
> Public Sub Button1_Click()
>
> Dim I As Integer
>
> For I = 1 To 10
>  Print Test(0.2)
> Next
>
>  End
>
>
> 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
>
>
> I launched and I received in console:
>
> 1250000
> 1250000
> 1250000
> 1250000
> 1250000
> 1250000
> 1250000
> 1250000
> 1250000
> 1250000
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to