From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Call by reference vs. call by value
Date: 1996/07/22
Date: 1996-07-22T00:00:00+00:00 [thread overview]
Message-ID: <dewar.838067841@schonberg> (raw)
In-Reply-To: wvyspakfnn4.fsf@swlpts1.ssd.ray.com
Chris said
"Well, I guess I never conceived a machine might exist where call-by-
value for anything bigger than a word is more efficient than call by
reference, so my first instinct would be to dictate that
call-by-reference be used in all cases. I believed the opposite was
true, however, because I wrongly thought that the designers of Ada
valued safety over performance, which is not really true."
Well as I hope is clear from my earlier post, your conception was not
broad enough :-)
Cases where values larger than one word are more efficiently passed by
copy:
- when bit alignment is involved (packed case)
- several words can be passed in registers (according to many ABI's)
- caller and callee are in different address spaces
and here are undoubtedly more.
Note that the idea of allowing implementation freedom here is not new.
Fortran-66 is quite explicit in leaving it up to the implementation
whether parameters are passed by value or reference.
next prev parent reply other threads:[~1996-07-22 0:00 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-07-20 0:00 Call by reference vs. call by value Christopher Felaco
1996-07-20 0:00 ` Robert Dewar
1996-07-21 0:00 ` Robert A Duff
1996-07-21 0:00 ` Robert Dewar
1996-07-22 0:00 ` Robert A Duff
1996-07-23 0:00 ` Peter Amey
1996-07-23 0:00 ` Robert Dewar
1996-07-24 0:00 ` Robert A Duff
1996-07-23 0:00 ` Robert A Duff
1996-07-27 0:00 ` Peter Morris
1996-07-28 0:00 ` Robert A Duff
1996-07-24 0:00 ` Richard A. O'Keefe
1996-07-22 0:00 ` Felaco
1996-07-22 0:00 ` Robert A Duff
1996-07-30 0:00 ` Richard A. O'Keefe
1996-07-22 0:00 ` Robert Dewar [this message]
1996-07-22 0:00 ` Karl Cooper {46901}
1996-07-22 0:00 ` Robert Dewar
1996-07-30 0:00 ` Felaco
1996-07-31 0:00 ` Robert A Duff
1996-08-02 0:00 ` Robert Dewar
1996-08-03 0:00 ` JP Thornley
1996-08-05 0:00 ` Roderick Chapman
1996-07-20 0:00 ` James A. Krzyzanowski
1996-07-20 0:00 ` Robert Dewar
1996-07-21 0:00 ` Robert A Duff
1996-07-21 0:00 ` Robert Dewar
-- strict thread matches above, loose matches on Subject: below --
1996-07-25 0:00 Marin David Condic, 407.796.8997, M/S 731-93
1996-07-26 0:00 ` Peter Amey
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox