Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Memory Pre-Allocation Trick?
Message
De
12/11/2002 20:34:46
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
12/11/2002 20:03:33
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00721182
Message ID:
00721942
Vues:
34
>There may be another downside...
>
>A 1 million times loop of your 2 samples too:
>
>- string concatenation: 9.332 seconds
>- TEXTMERGE sequence: 45.210 seconds
>
>I think that the difference makes it worth thinking about before wholeheartedly adopting the TEXTMERGE method.

I've repeated this test with different levels of complexity (namely, number of variables and string concatenations), and the result is not exactly 5:1, more like 3:1, but it does confirm your finding.

At least, Textmerge method is easier to maintain - you see just the text and the insertable pieces; with string concatenation you get long expressions with chunks of text here and there. I've maintained code which had dozen lines of string concatenation here and there, and it was so easy to get lost in it. Converting that to textmerge maybe lost a few milliseconds, but saved long minutes in maintenance.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform