Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP versus C++
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00842594
Message ID:
00851350
Vues:
14
Hi John,

>Just out of curiosity, have you benchmarked VFP 8 and C++ when finding the number of occurences of Anna in a text file of War and Peace?

No, but I wouldn't expect much of a difference here. The OCCURS() function is written in C++ and can just as quickly scan the text. What slows VFP down is basically:

a) You cannot specify a size for a string but only use part of that allocated memory. Every time you extend a string, VFP needs to allocate new memory.

b) You can't easily access individual characters or substrings. You have to use SUBSTR() and STUFF(). Especiall, STUFF is slow because

c) VFP has no concept of manipulating an existing string. Every string function that manipulates a string returns a new one as a result. Due to the number of string copy operations, manpipulating large strings in VFP is comparable slow.

--
Christof
--
Christof
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform