Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Side by side comparison (strings & local data)
Message
De
13/01/2004 05:19:17
 
 
À
12/01/2004 23:31:29
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
00861648
Message ID:
00866272
Vues:
31
Walter

C# code (took 0.15)
//Get Random
StartTest() ;
for (int e = 1; e <= 10000; e++)
{
	//Employee ID
	Keys[0] = e ;

	//Get Boss ID from Employee
	Keys[0] = Result.Rows.Find(Keys)["superiorid"] ;
	BossRow = Result.Rows.Find(Keys) ;

	//Get Boss
	if (BossRow != null && (int)Keys[0] > 0)
	{
		do 
		{
			Keys[0] = BossRow["SuperiorId"] ;
			BossRow = Result.Rows.Find(Keys) ;
		}
		while (BossRow != null  && (int)Keys[0] > 0) ;
	}
}
EndTest() ;
VFP Code (took 0.06)
=Start()
FOR x = 1 TO 10000
	*Get Employee
	=SEEK(x)

	*Get Boss
	DO WHILE SuperiorId <> 0 AND SEEK(SuperiorId)
	ENDDO
ENDFOR
=Finish()
Not only that, but taking into account that VFP was only half the code.....

Kev
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform