Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Textmerge to file vs string concatenation
Message
De
23/07/2003 08:50:59
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
23/07/2003 07:49:25
Dorin Vasilescu
ALL Trans Romania
Arad, Roumanie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00812707
Message ID:
00812733
Vues:
8
>I've just run this code and I found that textmerge to file is 40 times faster than string concatenation using memory variable. It is true or I miss something?
>
>#define _loops 20000
>CLEAR
>? _loops, 'loops'
>_t=SECONDS()
>xx=''
>FOR i=1 to _loops
>	xx=xx+'123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890'
>NEXT
>?'String concatenation:',SECONDS()-_t
>
>_t=SECONDS()
>SET TEXTMERGE TO memvar xx NOSHOW
>FOR i=1 to _loops
>	\\123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
>NEXT
>SET TEXTMERGE TO
>?'Textmerge to memvar:',SECONDS()-_t
>
>
>_t=SECONDS()
>SET TEXTMERGE TO xx.txt NOSHOW
>FOR i=1 to _loops
>	\\123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
>NEXT
>SET TEXTMERGE TO
>xx=FILETOSTR('xx.txt')
>?'Textmerge to file + FILETOSTR()',SECONDS()-_t
>ERASE xx.txt
>
True.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform