Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Codebase product reviews
Message
 
À
03/01/2000 12:06:41
Kenneth Downs
Secure Data Software, Inc.
New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00311632
Message ID:
00311784
Vues:
18
Kenneth,

>>As far as speed, the library itself is fast, but VisFox is faster at native functions.
>
>IOW, the equivalent of a simple statement, such as COPY TO FOR..., is slower in the C++ implementation than the same command in VisFox? Or does this apply only to situations where you are calling in the loop?

That's right. simple statements that work in VisFox (IME) run as fast as anything I've coded in codebase. Of course, I've had to right a few codebase routines where there is no VisFox equiv, and they still work fast.

>This is interesting that you say this. In beginning my experiments, I wrote a little dummy routine in C++ that would loop a few times and return, then built a DLL.

The reason I needed the FLL was so codebase could enter data into the current VisFox work area. Of course with a DLL you don't have VisFox work area access, so you're right, a straight DLL call will be *Much* faster than an FLL call, since it doesn't have to access VFP work areas or variables.

It seems since you won't be using VisFox at all, you can just write the DLL's and call them from whatever language you're using and get excellent speed.

-Ed


>Ed,
>
>So:
>
>>As far as speed, the library itself is fast, but VisFox is faster at native functions.
>
>IOW, the equivalent of a simple statement, such as COPY TO FOR..., is slower in the C++ implementation than the same command in VisFox? Or does this apply only to situations where you are calling in the loop?
>
>>> If you are planning on writing a FLL, try not the leave the library until all processing is done.
>
>Actually, the need is more for an engine than a library, something that does a specific set of tasks. I don't see mixing native VFP and DLL calls. But the warning is well taken.
>
>>> The switching between FLL library and VisFox code is very expensive. As long as the loop runs inside the C++ FLL it will be fast.
>
>This is interesting that you say this. In beginning my experiments, I wrote a little dummy routine in C++ that would loop a few times and return, then built a DLL. I found that putting a call to this DLL inside a Fox loop like the following:
>
>
>FOR k = 1 TO 100000
>  =MyDLLCall()
>ENDFOR
>
>
>could execute as fast as any other loop that did not involve a disk access, but that it slowed way down when I put a call into any optimizable expression, such as:
>
>
>COPY TO... FOR (My Optimizable Expression) AND MyDLLCall()
>
>
>The COPY TO runs at standard VFP speeds without the DLL call, but slows down by a factor of 10 with the DLL call.
>
>Do you think there is a difference between the FLL and the DLL that could be causing you to see the expensive call? Are you attempting calls inside optimizable commands?
>
>Thanks for the reply.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform