Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Speed: VFP 6 vs VB
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00135486
Message ID:
00136256
Vues:
29
Bottom line is that if VFP can perform simple, low-level functions in anywhere near the speed of C++, the VFP team is doing an excellent job.

I think some of the best C++ programmers out there must love VFP...because they coded it!

Take care.


>Albert,
>
>I didn't try strstream, I didn't know that would keep the whole 100k string available. I did try fixing the CString buffer size it doesn't change the performance much at all.
>
>FWIW bagging the CString and replacing it a more special case (i.e. predefined buffer size char)
>
>
int CStrtestdllApp::test3()
>{
>char cTest[100100];
>char *ap;
>
>ap = cTest;
>int i;
>clock_t tStart;
>tStart = clock();
>for ( i = 0; i < 10000; i++ )
>   {
>   sprintf( ap, "%10d", i );
>   ap += 10;
>   }
>tStart = ( clock() - tStart );
>return (int)tStart;
>}
>
>And the code executes in 0.05 seconds, on par with the VFP6 code.
>
>>Compared to VFP 5.0a, the C++ takes aprox. half the time. See how VFP 6.0 fairs.
>>
>>The C++ io stream classes are capable of doing easy formatting much more flexibly than the old C stdio functions.
>>
>>This example could be faster if the max size of the string were set so dynamic memory allocation is not necessary.
Joseph C. Kempel
Systems Analyst/Programmer
JNC
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform