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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,21321460863e2689 X-Google-Attributes: gid103376,public From: "Thierry Lelegard" Subject: Re: Why parameter passing by copy? Date: 2000/05/27 Message-ID: <8gokhf$a6j$1@front6m.grolier.fr>#1/1 X-Deja-AN: 627951772 Content-Transfer-Encoding: 7bit References: X-Priority: 3 Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 X-Trace: front6m.grolier.fr 959436143 10451 213.44.48.217 (27 May 2000 14:02:23 GMT) Organization: Club-Internet (France) X-MSMail-Priority: Normal Mime-Version: 1.0 NNTP-Posting-Date: 27 May 2000 14:02:23 GMT Newsgroups: comp.lang.ada Date: 2000-05-27T14:02:23+00:00 List-Id: > Ada requires that scalars be passed by copy. I was under the impression > that this was chosen because it was faster, but i've never seen a > rational argument for this from the Ada83 perspective of computer > hardware, nor whether such arguments still hold true for modern > processors. On the contrary, it is even more true for modern processors than for old ones. For fast RISC processors, memory is a "slow device". Accessing a datum in memory (passing the address) is much slower than passing it in a register (by copy). Most calling standards for RISC processors pass the arguments (or the first N arguments) in registers. ________________________________________________________ Thierry Lelegard, Paris, France E-mail: lelegard@club-internet.fr