public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [Q] Cleaning string whitespace trimming. Does it make any sense?
Date: Wed, 13 Jun 2012 18:37:38 +0000	[thread overview]
Message-ID: <20120613183738.GV13539@mwanda> (raw)
In-Reply-To: <CALF0-+V15wjFhZH5P1C+4sJ9QSw7QY5Rk383S4XhVVCBsnXUQw@mail.gmail.com>

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@oracle.com> 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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2012-06-13 18:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-12 17:52 [Q] Cleaning string whitespace trimming. Does it make any sense? Ezequiel Garcia
2012-06-12 18:49 ` Dan Carpenter
2012-06-12 20:58 ` Dan Carpenter
2012-06-12 22:03 ` Ezequiel Garcia
2012-06-13  6:06 ` Dan Carpenter
2012-06-13  7:23 ` walter harms
2012-06-13 17:06 ` Ezequiel Garcia
2012-06-13 18:16 ` Ezequiel Garcia
2012-06-13 18:21 ` Dan Carpenter
2012-06-13 18:30 ` Ezequiel Garcia
2012-06-13 18:37 ` Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120613183738.GV13539@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox