[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] Performance: C contra Ada



Michael Rasmussen skrev:

> I C foregår parameteroverførsel med call-by-reference, mens det for
> Ada gælder, at parameteroverførsel laves med
> call-by-copy/restore.

Ikke altid.  Der er tilfælde, hvor det er obligatorisk at kopiere en
parameter ind og/eller ud.  Der er også tilfælde, hvor det er
obligatorisk bare at overføre en henvisning til objektet.  Men
derudover er der også en del tilfælde, hvor det står oversætteren frit
at vælge.

> Ifølge min købmandsregning burde det derfor være indlysende, at
> parameteroverførsel i Ada er en dyr instruktion rent
> performancemæssigt!  Har jeg misforstået noget her, eller holder min
> købmandsregning stik?

Din købmandsregning holder stik, men ikke antagelserne bag den.

Og da et af designkravene til Ada var at det skal gøre det muligt for
oversætterne at generere effektiv kode (dog ikke på bekostning af
korrekthed), ville det også være lidt underligt.

Hvis du er interesseret, kan vi godt prøve at analysere nogle konkrete
kodeeksempler.

Jacob
-- 
Alle Bennys citroner deler én flad grøn have. Inden jul
køber Lotte marcipan, nougat og pistacienødder. Quizzen
retter søgelyset totalt udenom vinderens whisky. Xenias
yndige zebras ærbare øjne åbnes.


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:43 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *