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 X-Google-Thread: 103376,6405eefbf080daa6 X-Google-Attributes: gid103376,public From: "Tarjei Tj�stheim Jensen" Subject: Re: Is an RTOS Required for Ada? Date: 1999/05/20 Message-ID: <3744657E.A04ABC52@online.no>#1/1 X-Deja-AN: 480239423 Content-Transfer-Encoding: 8bit References: <373B2927.7B22F898@pop.safetran.com> <19990514155120.03860.00000396@ng-cr1.aol.com> <7hmc18$jr6$1@nnrp1.deja.com> <7i15hp$mc2@ftp.kvaerner.com> <1999May20.112204.1@eisner> Content-Type: text/plain; charset=iso-8859-1 X-Complaints-To: news-abuse@online.no X-Trace: news1.online.no 927229715 130.67.224.237 (Thu, 20 May 1999 21:48:35 MET DST) Organization: Jensen programvareutvikling MIME-Version: 1.0 NNTP-Posting-Date: Thu, 20 May 1999 21:48:35 MET DST Newsgroups: comp.lang.ada Date: 1999-05-20T00:00:00+00:00 List-Id: Larry Kilgallen wrote: > Tarjei Tj�stheim Jensen writes: > > > > Robert Dewar wrote > >>For example, in GNORT mode, the compiler will generate an open > >>loop for a block copy, to avoid calling the bcopy routine in > >>the run-time > > > > > > I'm rather surprised. I would assume that the most eficient way of doin this > > would be to use inline assembly code. I thought most cpus have a nice set of > > special instructions that will do this. Could there be problems with using > > these instructions? > > Those with great concern for speed will often be using RISC machines, > where instruction sets have been simplified. Presuming reasonable > caching inside the CPU, data loads and stores will dominate the > copy time. > My question was rather clumsily put: My surprise was that gnat used bcopy instead of generating the instructions. It seems to be overkill to call a function instead of just emitting the assembly instructions. I seem to remember that function calls are supposed to eat clock cycles and should if possible be avoided. Especially in cases like this where I assume (I've not checked this so I may be horribly wrong) this is a frequent function call. It is hard to imagine the function call being any saving in either time or space over emitting the code inline. Greetings,