Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Benchmarking VFP for string processing.
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00172131
Message ID:
00172158
Views:
31
Hi John,

I found your tests interesting. I do, however, have a few comments.

VFP 6.0 when working with local variables is signicantly (more than 100%) faster than VFP 5.0. I ran a series of tests and where 6.0 concatenated string in approximately 0.014 seconds 5.0 running the same code took nearly 2.4 seconds.

I found, as you did, that concatenating an array element string was much slower, taking over 28 seconds in both VFP 5.0 and 6.0. In other words, VFP 6.0's handling in this case is no better than 5.0's.

As far as objects go, I was surprised that bracketing the FOR...ENDFOR with WITH o...ENDWIDTH and using .Str = .Str +...resulted in only a marginal increase in performance.

I'd suggest that you assign a the terminating value of the SECONDS() function to a variable in your tests. Passing it as a parameter to your function you're adding time (albeit rather miniscule) that is not connected with what you're trying to measure.

Along the same lines, the test where you pass the string by reference really doesn't apply either. What you're measuring there is both the mechanics connected with parameter passing and string manipulation. In general, passing strings by reference is always going to be more efficient than passing them by value, with the exception of 1-3 byte strings. You'll find that when passing strings by value, the length of time connected with passing the parameter is directly connected with the length of the string. When passing by reference, this doesn't come into play.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform