From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] Do we need regex in libsensors?
Date: Fri, 29 Jun 2007 18:25:38 +0000 [thread overview]
Message-ID: <46854EA2.2090609@hhs.nl> (raw)
In-Reply-To: <20070629190035.36806ea8@hyperion.delvare>
Jean Delvare wrote:
> Hi all, hi Hans,
>
> I've made a performance regression test on the new libsensors. It shows
> a significant performance drop. Valgrind showed that almost half of the
> total CPU cycles were spent in sensors_feature_get_type(), and in
> particular in regexec(). Looking at what the code does, I don't think
> that we need the power of the regex engine; sscanf() should be enough.
> I've reimplemented the function using sscanf(), it seems to work just
> fine, and is much faster (although not yet as fast as the original, but
> I guess this is expected due to the dynamic feature gathering.)
>
<snip>
> Is it OK to apply this, or does anyone have a good reason to believe
> that sscanf() won't be sufficient in some (present or future) case?
>
The patch looks fine to me. I applied it over here and did some testing, I
couldn't find any issues. So as far as I'm concerned its ok to apply.
Regards,
Hans
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2007-06-29 18:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-29 17:00 [lm-sensors] Do we need regex in libsensors? Jean Delvare
2007-06-29 18:25 ` Hans de Goede [this message]
2007-07-03 8:22 ` Jean Delvare
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=46854EA2.2090609@hhs.nl \
--to=j.w.r.degoede@hhs.nl \
--cc=lm-sensors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.