On Fri, 2011-10-14, A wrote:
>> The above sounds as if you're asking about how to define functions, but
>> then in the text you indicate that you are familiar with that. So it does
>> not make sense as given. You need to provide a more clear example.
>
> If I call a function that would imply after compilation - storing registers
> on stack, a call to function, then returning registers from stack and
> return. All of that takes CPU cycles for time-critical loops. With inline
> code it would be compilers job to kind of "paste" a code defined in the
> template. And no, I don't really want to use inline assembly.
You use the term "inline" over and over, but you seem to overlook
inline functions. All the (relatively) costly things you mention above,
plus the missed optimization opportunities, go away with inline
functions.
....
> So that's what I'm looking a way for to do. Like I said, I know how to use
> functions.
Not if you equate calling a function with heavy stack/register
operations.
/Jorgen
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
|