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
------------------------------------------------------------------------------
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user