Path: utzoo!attcan!uunet!cs.utexas.edu!usc!apple!mips!sgi!shinobu!odin!ramoth.esd.sgi.com!msc From: msc@ramoth.esd.sgi.com (Mark Callow) Newsgroups: comp.sys.sgi Subject: Re: C inline functions Keywords: C functions Message-ID: <8897@odin.corp.sgi.com> Date: 13 Jun 90 17:55:29 GMT References: <788@ki.UUCP> Sender: news@odin.corp.sgi.com Reply-To: msc@sgi.com Organization: Silicon Graphics Inc., Entry Systems Division Lines: 20 In article <788@ki.UUCP>, dwatts@ki.UUCP (Dan Watts) writes: |> In the 3.2 release of Irix, is there a way to make the C compiler generate |> inline code for memcpy() instead of calling a subroutine? I'd rather have |> the increased code size to get the increased speed I want. Even though |> a call isn't all that much time, compared to the length of time it takes |> to do the actual move it must be great. |> Function calls on the mips R[23]000 are fast, particularly to leaf functions (functions that make no further calls) such as memcpy(). I doubt if you would notice any performance difference in your program. Perhaps you would if your program is making huge numbers of calls to memcpy to copy just a few bytes. This sounds like what my esteemed colleague Kipp calls "premature optimization." -- From the TARDIS of Mark Callow msc@ramoth.sgi.com, ...{ames,decwrl}!sgi!msc "There is much virtue in a window. It is to a human being as a frame is to a painting, as a proscenium to a play. It strongly defines its content."