From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 24 Nov 2013 06:45:34 -0600 Newsgroups: comp.lang.ada Date: Sun, 24 Nov 2013 07:45:31 -0500 From: "Peter C. Chapin" X-X-Sender: peter@whirlwind Subject: Re: How To Pass Large Object Arguments In-Reply-To: Message-ID: References: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-uOPpbk4bQVKhRKrf3ue9Yb+qOkW+XJbXkHrb6uWEEMYCPXXATkAgc40o50Rx4AZIaUX3Xr4rpKrRCZv!MFBd6fyj7pOvRnnScCb/j0lw5fw2vKYep+5y5indeQ/gA9LPCtsknNGdtNzmFRticMIZUbFEAw== X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1833 Xref: number.nntp.dca.giganews.com comp.lang.ada:183983 Date: 2013-11-24T07:45:31-05:00 List-Id: On Sat, 23 Nov 2013, FritzVonBraun wrote: > So my question is, is there a de facto standard at least? Let the compiler worry about it. You only need to step in if you can show (for example with profiling) that your program's performance is inadequate AND the problem is due to a "foolish" choice of parameter passing mechanism on the part of the compiler. Certain types are definitely passed by reference, e.g., limited types that can't be copied. For types that could be passed either way I think you can be confident that any sane compiler will do "the right thing" and pass large objects by reference. Peter