Just reading the manual (yes I'm strange) for FUNCTION
I don't understand this. Surely the fastest way to pass data is by passing a pointer to the data, rather than the data itself. If I read correctly parameters are passed on the stack, so a push of a pointer then a corresponding pop would be a lot faster then push(ing) clumps of data.
What am I missing here?
Can someone explain please?
Pat
arguments
<snip>
Normally, PowerBASIC passes parameters to a Function either by reference (BYREF) or by copy (BYCOPY). Either way, the address of the variable is passed and the procedure has to look at that address to get the value of the parameter. If you do not need to modify the parameters (true in many cases), you can speed up your calls by passing the parameters by value using the BYVAL keyword.
<snip>
Normally, PowerBASIC passes parameters to a Function either by reference (BYREF) or by copy (BYCOPY). Either way, the address of the variable is passed and the procedure has to look at that address to get the value of the parameter. If you do not need to modify the parameters (true in many cases), you can speed up your calls by passing the parameters by value using the BYVAL keyword.
What am I missing here?
Can someone explain please?
Pat
Comment