dwatts@ki.UUCP (Dan Watts) (06/12/90)
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. Dan Watts -- ##################################################################### # CompuServe: >INTERNET:uunet.UU.NET!ki!dwatts Dan Watts # # UUCP : ...!uunet!ki!dwatts Ki Research, Inc. # ############### New Dimensions In Network Connectivity ##############
msc@ramoth.esd.sgi.com (Mark Callow) (06/14/90)
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."