[EMAIL PROTECTED] wrote:
> 
> >See my comment to Casper Dik - this is IMO bad for at least two reasons:
> >- You have to handle the varargs overhead. The source code looks smaller
> >and cleaner but I am not sure whether the resulting binary will be
> >smaller
> 
> *What* varargs overhead?

Maybe not on Solaris/SPARC or Solaris/i386 - but there are platforms (or
were at least) where the varargs stuff caused HEAVY overhead. Since my
proposal would be to move it into some standard (ISO-C etc.) having a
varargs version around may be a bad idea.

>     - calling strMANYcat() is shorter (generated code wise) then
>       multiple calls to strcat()

But you cannot save pointers between invokations. And the function could
be an inline function which makes it almpst zero overhead (well, the
varargs version could be inlined, too - but there is still a loss of
flexibility).

>     - varargs is really cheap in the called function (and the cost
>       is all in a single location)
> 
> But the return value of strcat() is indeed useless.

I agree.

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [EMAIL PROTECTED]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to