Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fast string function
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01358927
Message ID:
01359072
Vues:
25
Hi Adam,

> Yes but nothing about AT,SUBSTR and Left functions in this article. In my opiniont this functions are slow.

These functions, by themselves, are actually pretty quick, but once you start combining them into complex routines with larger strings, they can start to slow down. I doubt you could find an API or FLL function that would to a 1-to-1 replacement of these functions that would be any faster...they would probabaly be slower because VFP has to copy all the memory, at least twice for each API call.

It sounds like you would be better off changing the way your routine operates on the strings and use pointers instead of full-string functions. This is a different approach, and can be complex, but it can also be lightning faster that iterating through strings using AT( ) and SUBSTR( ).

If you want to post a sample of what you are doing, I will try to offer an alternative using a string pointer technique and VCR functions that you can just DECLARE in a FoxPro function.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform