Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reverse comma-delimited string
Message
De
07/09/2019 10:18:44
 
 
À
04/09/2019 18:19:17
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01670542
Message ID:
01670681
Vues:
44
>>>Amazing!! So why isn't anything internal to FoxPro able to do it that fast?
>
>I suspect performance difference is not just lack of System.Collections.Generic's Reverse method in VFP, but exponential inefficiency as the lengthening result string keeps requiring a new block of memory. It might be interesting to try concatenating into a memo field with Block Size set to (say) 10 (=5120 bytes) to see whether that speeds it up by allowing concatenation in place. If I had time I'd also experiment with a result string of correct length- even the original source string- with words STUFFed into it in place.

Quite up thread I wrote about the problems vfp will run into on very long strings and huge numbers of concats.
If you KNOW that your data will have such items, one of the fastest AND easiest to read things is to pipe into a fOpened() file, as the strings accumulate in the buffer, writes sometimes are offloaded to system routines. Counterintuitive to use a file instead of memory, but for vfp memory (if talking huge amounts) certainly true. If strings get large and # of operations low, marshalling across COM into file opened with Scripting host beats vfp F-functions...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform