Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Demo App How?
Message
De
04/07/2007 05:13:22
 
 
À
04/07/2007 02:47:31
Christoph Krapp
Tiefkühldienst Gmbh
Lohne, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
VFP Compiler for .NET
Titre:
Divers
Thread ID:
01237023
Message ID:
01237706
Vues:
17
>
>TLOCAL lnCount as Integer
>FOR i = 1 TO 5
>	Local lnStart
>	lnStart = Seconds()
>	lnCount = 0
>	Do While m.lnCount < 5000000
>		m.lnCount = m.lnCount + 1
>	EndDo
>	? i, Seconds()-lnstart, "sec. for 5,000,000 iteration"
>ENDFOR
>? "Ready"
>
Such a construct should be eliminated by the JIT-compiler. But I found a smilar way to count to 499 once in live code including one substraction after a for loop to 500<g>. But seriously, strong typing in the Dotnet-compiler can be a real help if you need to speed up specific functions/methods working on memvars. For this type of work in vfp I usually have to go "native" via fll and this can eat up budget, especially if maintainance has no idea of C...

For a non-trivial, although not really business-like scenario I implemented the sieve of erathosthenes in vfp and a slightly tweaked version for the Dotnet compiler. Should be on ETEC site and show you that strong typing (while slower to type) not only catches errors early in the process but really can give a boost. I never understood any kind of flak against optional strong typing, as it can give me nearly the best of both worlds.

regards

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

Click here to load this message in the networking platform