Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bbn!uwmcsd1!ig!jade!ucbvax!sdcsvax!ucsdhub!jack!man!crash!pnet01!haitex From: haitex@pnet01.cts.com (Wade Bickel) Newsgroups: comp.sys.amiga Subject: Re: M2Amiga, a new Modula-2 compiler Message-ID: <2010@crash.CTS.COM> Date: Mon, 16-Nov-87 21:36:14 EST Article-I.D.: crash.2010 Posted: Mon Nov 16 21:36:14 1987 Date-Received: Thu, 19-Nov-87 19:53:58 EST Sender: news@crash.CTS.COM Organization: People-Net [pnet01], El Cajon, CA Lines: 45 dillon@CORY.BERKELEY.EDU (Matt Dillon) writes: >:The code for a ROM call is exactly the same as the code for a procedure call >:to a prodecure of an other module. The placing of parameters into registers >:doesn't make a big difference. With other compilers you have an external call >:to the assembler stub popping parameters into registers and eventually pushing >:results back on the stack again and the basic ROM call. >: >:Simplified: The time others arrive in their stubs we arrive at the function in >:ROM. >: >:A German jounalist doing some reseach on this came up with following figures. >:machine cycles for a Library Call. >:TDI ~250, Manx ~140, M2Amiga 94, he complained because the optimal Assembler >:call only uses 74 cycles. This still leaves some space for improvement :-) > > Well, I wouldn't get too caught up in it. For one thing, those >numbers are obviously averages over quite a few different calls, because >things like Remove() from assembly take maybe 22 cycles of overhead >(loadregister-4, jsr-18) in the call... common RTS and meat not included. >If you look carefully, I think you will find that the library calls that run >quickest take fewer arguments and thus less overhead, and the library calls >that take more arguments generally take longer to complete anyway, so the >overhead can almost be thought of as a straight percentage of the execution >time for the call. > > This straight percentage is going to be very low, so optimizing >from 140 to 74 isn't going to be noticeable at all. > > -Matt > Seems to me any cycles are important. Perhaps not for general code, but when it comes to the decision as to weather or not to use assembly, this could make a difference. Wade. PS: Matt, have you tried Modula-2? I know your a C programmer, and just wondered if you'd given M2 a look. UUCP: {cbosgd, hplabs!hp-sdd, sdcsvax, nosc}!crash!pnet01!haitex ARPA: crash!pnet01!haitex@nosc.mil INET: haitex@pnet01.CTS.COM