Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which Is Better???
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Which Is Better???
Miscellaneous
Thread ID:
00458477
Message ID:
00458477
Views:
48
I am updating a series of PRG's to optimize them for speed and to get them ready to convert into classes.

I am finding statement's like:


   replace all cpt_code with h->new_cpt for;
      h->new_cpt<>space(10).and..not.subs(h->new_cpt,1,1)$'QHZ'


My updated version is:


   REPLACE ALL Cpt_Code WITH Cdm.new_cpt;
     FOR NOT EMPTY(Cdm.new_cpt) AND NOT LEFT(Cdm.new_cpt,1) $ "QHZ"



In the first example, you can see where I replaced the '<>space(10)' with 'NOT EMPTY()' and
the 'SUBSTR()' with 'LEFT()'


So my question is, in a program with many of these REPLACE statements, what kind of speed advantages will I see with these changes?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform