>Jonathan,
>
>Hacker's Guide (Faster than a speeding bullet section) says that FUNCTION and PROCEDURE slow things down by as much as factor of 10. They also tested DO MyFunction IN MyProcedureFile and it's also slow.
>
My experience is that the difference in time is closer to 100 to 1. (See thread "90 milliseconds to call simple function" starting on 8May1999.
This is a copy of a post on some of my research:
Yep, if I comment out the FUNCTION line (and the ENDFUNC line), the average time to call goes from 96 milliseconds to 1 ms.
But, and I think this is significant, if I copy the function with the FUNCTION line into the default directory, the average time to call is also 1 ms.
News flash: if I place a CLEAR PROGRAM statement after the function call, the average time goes from 1 ms to 96 ms!
Here is what I am seeing:
Function contains FUNCTION ----------> T--F--T--F--T--F--T--F
Function is in remote directory------------> T--T--F--F--T--T--F--F
Call followed by CLEAR PROGRAM---.> T--T--T--T--F--F--F--F
Lowest average time to call-------------->102.90.68.68.96..01.01.01
Highest average time to call-------------->104.96.72.72.95..03.03.03
So the FUNCTION statement must be intefering with the buffering of the function. I don't know why having the function in the local directory makes a difference to the buffering but that is the only explanation that I can see.
Peter
Peter Robinson ** Rodes Design ** Virginia