In article <3744657E.A04ABC52@online.no>, "Tarjei Tj�stheim Jensen" writes: > 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. Some systems have tiered costs for function calls, depending on the degree of complexity you require for the interface. Certainly a function call can save space over a copy loop, depending on not only the instruction set but also the rest of the machine design (alignment, etc.) Is saving space worth it ? Some compilers let you choose between saving space and saving time. For copying a long string, I would think function call overhead would be lost in the noise. For copying a short string, obviously not. Is the string length known at compile time ? I prefer to shy away from criticizing a code generation algorithm until I have a specific program of my own that gets bitten by a problem. Larry Kilgallen