Efficient Parameter passing

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Macca (Macca_at_discussions.microsoft.com)
Date: 10/05/04


Date: Tue, 5 Oct 2004 08:33:03 -0700

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



Relevant Pages

  • Re: Hey ArQ
    ... Passing 10 1 ... Rushing 10 9 ... Third Down Efficiency 5-13 4-12 ... stole his pickup truck and ran over his dog. ...
    (rec.sport.football.college)
  • Re: Hey ArQ
    ... > First Downs 20 10 ... > Passing 10 1 ... > Third Down Efficiency 5-13 4-12 ... stole his pickup truck and ran over his dog. ...
    (rec.sport.football.college)
  • Re: Choosing function parameter types - pointers or objects?
    ... not to, in your function parameters? ... You'd have the measure the efficiency of: ... Passing the object by value. ... For the intrinsic types, is faster. ...
    (comp.lang.c)
  • Re: Hey ArQ
    ... First Downs 20 10 ... Passing 10 1 ... Rushing 10 9 ... Third Down Efficiency 5-13 4-12 ...
    (rec.sport.football.college)
  • Re: textbook authors: passing by ref is NOT more efficient!
    ... efficiency in terms of performance and we are talking reference objects. ... passing by reference, as I am not allocating memory in many cases. ...
    (microsoft.public.dotnet.languages.csharp)