otavioreis
Messages postés82Date d'inscriptionjeudi 5 avril 2007StatutMembreDernière intervention 4 mars 2008
-
12 juin 2007 à 11:58
Lutinore
Messages postés3246Date d'inscriptionlundi 25 avril 2005StatutMembreDernière intervention27 octobre 2012
-
12 juin 2007 à 18:11
Bonjour,
J'ai écrit le programme suivant à partir d'un copier-coller de Java mais le temps d'execution est 20 fois plus long.
Est-ce que quelqu'un saurait si c'est normal ou les moyens de l'améliorer, SVP?
Merci pour votre aide.
public class fonctions4
{
/** Creates a new instance of fonctions4 */
public static double Ax(String table, int X, int an, double i)
{
double Ax = -10000000;
for (int j = 0; j < 1000; j++)
{ if (fonctions3.Dx(table, X, an, i) 0) { Ax 0; }
else { Ax = fonctions3.Mx(table, X, an, i) / fonctions3.Dx(table, X, an, i); }
}
return (Ax);
}
}
temps d'execution de la fonction Ax:
nombre d'appels C# VBA JAVA
1 1031 43 90
10 6459 43 150
100 61158 390 271
1000 608375 3871 1362
10000 XXXXXX 38946 11669
Le temps d'execution est exprimé en millisecondes.