From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>, Tejun Heo <tj@kernel.org>,
Denis Vlasenko <vda.linux@googlemail.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: + lib-vsprintfc-even-faster-decimal-conversion.patch added to -mm tree
Date: Thu, 19 Mar 2015 23:15:05 +0100 [thread overview]
Message-ID: <87k2ycprbq.fsf@rasmusvillemoes.dk> (raw)
In-Reply-To: <CACVxJT9BD=EDuQCzyd9EhLtgg8QAjeYoYAa45E443QBNwhz6NQ@mail.gmail.com> (Alexey Dobriyan's message of "Thu, 19 Mar 2015 15:17:10 +0300")
On Thu, Mar 19 2015, Alexey Dobriyan <adobriyan@gmail.com> wrote:
> On Wed, Mar 18, 2015 at 1:04 AM, Andrew Morton
> <akpm@linux-foundation.org> wrote:
>> On Mon, 16 Mar 2015 18:19:41 +0300 Alexey Dobriyan <adobriyan@gmail.com> wrote:
>>
>>> Rasmus, I redid benchmarks:
>>
>> tl;dr ;) Is this an ack or a nack?
>
> New code executes slower for some input on one CPU I've benchmarked,
> both with -O2 and -Os (Core 2 Duo E6550).
Running Alexey's code on my Core 2 Duo, I can confirm that. However, my
own benchmark did show the claimed 25-50% improvement, depending on
distribution. One difference between our benchmarks is that in Alexey's
case all branches are perfectly predictable - whether that matters I
can't tell [is there a "flush branch prediction" instruction?]. Also, I
found a somewhat subtle flaw in his benchmark [1] which gave the old
code a small (1-2 cycles) advantage. Fixing that and applying the small
tweak I just sent out [2], Alexey's benchmark no longer shows any
difference between the old and new code on the Core 2 Duo.
Rasmus
[1] put_dec was inlined into num_to_str in the old code - in the actual
kernel code, it is and was not, since it has another caller. I somehow
just cargo-culted the noinline_for_stack annotations all over, so it
also wasn't inlined in the benchmark of the new code.
[2] https://lkml.org/lkml/2015/3/19/802
next prev parent reply other threads:[~2015-03-19 22:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5500b987.kerYYCYfIffruy3Z%akpm@linux-foundation.org>
2015-03-13 12:49 ` + lib-vsprintfc-even-faster-decimal-conversion.patch added to -mm tree Alexey Dobriyan
2015-03-13 12:56 ` Alexey Dobriyan
2015-03-13 13:00 ` Alexey Dobriyan
2015-03-13 23:53 ` Rasmus Villemoes
2015-03-14 9:21 ` Alexey Dobriyan
2015-03-16 15:19 ` Alexey Dobriyan
2015-03-17 22:04 ` Andrew Morton
2015-03-19 12:17 ` Alexey Dobriyan
2015-03-19 22:15 ` Rasmus Villemoes [this message]
2015-03-22 17:29 ` Denys Vlasenko
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=87k2ycprbq.fsf@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tj@kernel.org \
--cc=vda.linux@googlemail.com \
/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;
as well as URLs for NNTP newsgroup(s).