comp.lang.ada
 help / color / mirror / Atom feed
From: "Thierry Lelegard" <lelegard@club-internet.fr>
Subject: Re: Why parameter passing by copy?
Date: 2000/05/27
Date: 2000-05-27T14:02:23+00:00	[thread overview]
Message-ID: <8gokhf$a6j$1@front6m.grolier.fr> (raw)
In-Reply-To: dale-277623.23001027052000@news.rmit.edu.au

> 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






  reply	other threads:[~2000-05-27  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-27  0:00 Why parameter passing by copy? Dale Stanbrough
2000-05-27  0:00 ` Thierry Lelegard [this message]
2000-05-27  0:00 ` Pat Rogers
2000-05-28  0:00   ` Robert Dewar
2000-05-27  0:00 ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox