Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memory Pre-Allocation Trick?
Message
From
12/11/2002 20:34:46
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
12/11/2002 20:03:33
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00721182
Message ID:
00721942
Views:
33
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform