Re: Efficient Parameter passing
From: Dave Rahardja (ask_at_me.com)
Date: 10/06/04
- Next message: Rich: "Problem with OLE_XPOS_PIXELS and OLE_YPOS_PIXELS ?"
- Previous message: Nguyen Van Binh: "Re: How can I hook UI messages?"
- In reply to: Macca: "Efficient Parameter passing"
- Next in thread: Mihajlo Cvetanovic: "Re: Efficient Parameter passing"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 06 Oct 2004 03:00:17 GMT
Macca wrote:
> Hi,
>
> This is a general question to do with efficiency of passing parameters
> betwen functions.
>
> I have a function that requires a number of vectors.
>
> These vectors may be quite large in size so I thought about creating a
> structure that holds the vectors and then passing a pointer to this structure
> to the fuction that needs them.
>
> How would this compare to passing references to each vector, probably 5-6
> vectors needed, as parameters to the function?
>
> I'd appreciate any opinions on these methods of parameter passing and other
> methods.
>
> Thanks In Advance
In C++, passing a reference costs exactly the same as passing a pointer.
- Next message: Rich: "Problem with OLE_XPOS_PIXELS and OLE_YPOS_PIXELS ?"
- Previous message: Nguyen Van Binh: "Re: How can I hook UI messages?"
- In reply to: Macca: "Efficient Parameter passing"
- Next in thread: Mihajlo Cvetanovic: "Re: Efficient Parameter passing"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|