Chat applet growing
Denys Vlasenko
vda.linux at googlemail.com
Tue Feb 12 15:51:00 UTC 2008
On Tuesday 12 February 2008 15:33, Bernhard Fischer wrote:
> >static int chat_expect(char *answer, bool echo)
>
> static small{u,}int ?
In my experience, return values are better be int than smallint.
At least on x86, gcc generates (sligtly) worse code.
Local variables are 50/50 - sometimes smallint is a win, sometimes
it's a loss.
In general, smallints are winning if they are stored in memory
(struct member, global variable, etc...), and if you don't do
much math with them (otherwise gcc will emit additional widening
instructions etc).
--
vda
More information about the busybox
mailing list