[Gambas-user] Is Fast faster than C all the time ??
Benoît Minisini
gambas at ...1...
Tue Sep 15 17:54:00 CEST 2015
Le 15/09/2015 17:50, martin p cristia a écrit :
> I've found that this transformation run 10M times take:
>
> Fast Public Sub rotar3d(punto As Punto3d, rotado As Punto3d)
>
> ' voy a probar otro sistema
> rotado.x = MatrizRotacion[0, 0] * punto.x + MatrizRotacion[0, 1] *
> punto.Y + MatrizRotacion[0, 2] * punto.z
> rotado.Y = MatrizRotacion[1, 0] * punto.x + MatrizRotacion[1, 1] *
> punto.Y + MatrizRotacion[1, 2] * punto.z
> rotado.z = MatrizRotacion[2, 0] * punto.x + MatrizRotacion[2, 1] *
> punto.Y + MatrizRotacion[2, 2] * punto.z
>
> End Sub
>
>
> 24.5 seg normal
> 1.65 seg with C
> 0.94 seg with Fast
>
>
> then, it is worthy to use C in math (double precision) routines at all?
>
>
> -- Saludos Ing. Martin P Cristia
>
It should not, but nobody can read in your mind: show your Gambas code
(no idea what are the datatypes you use). And show your C code, there
may be some problem in it.
--
Benoît Minisini
More information about the User
mailing list