Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6 vs. VFP5 speed tests
Message
From
25/07/1998 16:50:27
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00120716
Message ID:
00121391
Views:
32
>>Test string manipulation of 5 verses 6. VFP 6 is supposed to be hundreds of times faster. I also learned something from George Goley's session at TechEd, relative to string manipulation. Instead of scanning through a table and doing
>>lcstring=lcstring+thisfield, let Fox do it's thing with copy to .... It is so much faster, it's off the scale.
>
>John, am I missing something? How can 'Copy to' be used to produce the same effect as lcString = lcstring+thisfield does inside a SCAN?
>
>TIA
>Barbara

copy field one_word to whatever sdf
x=chrtran(filetostr("whatever.txt"), chr(13)+chr(10)," ")
* still, strtran() won't remove _all_ the double spaces in one pass
do while at(" ",x)>0
x=strtran(x," ", " ")
enddo

or something like that. Though it wouldn't do any trimming by itself, but anothre strtran() could handle that. So we have only one or two string operations versus one per record, and one stupid file to remember to discard later. Mmmmm... I'll have to try this right on.

Ok, so I did, and slightly corrected the code (the corrected is what you see). Speed measurements, however, disapprove - it's slower than the classical SCAN method by about 30%.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform