Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP versus C++
Message
From
19/11/2003 13:31:58
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00842594
Message ID:
00851561
Views:
20
Hi Christof,

VFP OCCURS() is not a C++ routine very well implemented.

ALINES() is 80% faster

Then, paradoxicalally, it is more convenient to execute ALINES() and then RELEASE the created Array.
sString = ''
FOR k=1 TO 10000
sString = m.sString +','+REPLICATE('a',RAND()*1000)
NEXT
? LEN(m.sString)
t1=SECONDS()
FOR k=1 TO 10
  =OCCURS(",",m.sString)
NEXT
? SECONDS()-t1 && 2444 ms
t1=SECONDS()
FOR k=1 TO 10
  =ALINES(aoccurs,m.sString,",")
NEXT
? SECONDS()-t1 && 1342 ms
Fabio
Previous
Reply
Map
View

Click here to load this message in the networking platform