Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Faststring.dll
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Titre:
Divers
Thread ID:
01674989
Message ID:
01675014
Vues:
160
Hi Rick.

>Interesting. Are you doing this because you're running into a real perf issues with strings in FoxPro? For most tasks FoxPro strings actually perform very well so I'm wondering for which use cases you foresee these functions.

Constructing large string with many parts, or being able to divide up a large string into many parts.

>The biggest issues I see with FoxPro string performance is parsing character by character as is required for high performance parsers (like a JSON parser). When I built a JSON parser originally in FoxPro code it was incredibly slow because of the `SUB()` walking the string character by character. For even moderate size documents it was 100's of times slower than the comparable .NET code I ended up with (and eventually replaced with a generic parser).
>
>Unfortunately I don' t think there's a workaround for that - the overhead isn't the speed of Sub() but the mere function call that makes that so slow and an API call wouldn't make that any better I think.

Faststring.dll won't store its strings in VFP. You'll have to use FTRANSFORM(), FLEFT(), FRIGHT(), or FSUB() to return a string usable in VFP.

Inserts and deletes on any length strings will be roughly the same.

>+++ Rick ---
>
>>I'm getting ready to code this. If anyone has any comments or notes before I begin, please post them.
>>
>>
* General functions:
>>FNEW()        && Create a new fast string variable
>>FDELETE()     && Release a fast string variable
>>FZAP()        && Reset a fast string variable to empty
>>
>>* File I/O
>>FSTRTOFILE()  && Saves memory to a disk file
>>FFILETOSTR()  && Reads a disk file into memory
>>
>>* Multiple fast strings
>>FWELD()       && Welds two fast strings together
>>FCUT()        && Cuts a single fast string into two pieces
>>
>>* Obtain information
>>FLEN()        && Get the length of a fast string
>>FSTATS()      && Builds statistics on the fast string
>>
>>* Data manipulation:
>>FSTUFF()      && Insert and delete text out of a fast string
>>
>>* Data extract functions:
>>FTRANSFORM()  && Converts a fast string to a regular string
>>FLEFT()       && Get the left Nn characters of a fast string
>>FRIGHT()      && Get the right Nn characters of a fast string
>>FSUBSTR()     && Get an arbitrary portion from a fast string
>>
>>* Piece manipulation
>>FPIECECOUNT() && Get the number of pieces the string is in
>>FPIECEMAP()   && Builds a visual image of the pieces in memory
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform