Re: [Q] Cleaning string whitespace trimming. Does it make any sense?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 13, 2012 at 03:30:57PM -0300, Ezequiel Garcia wrote:
> On Wed, Jun 13, 2012 at 3:21 PM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> >
> > It returns a pointer to the first non whitespace character, but you
> > can just ignore the return value.  Normally the first character is
> > going to be non whitespace, so it's not even a slow down.
> >
> 
> Got it. I guess when you say there is no performance impact,
> it's because this kind of functionality is used very sparsely in the code.
> (Please correct me if I'm wrong.)

If the first character is non-white space then it's just one extra
branch statement.  And yeah, this tends to not be fast path code is
my guess.

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux