All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Epler <jepler@unpythonic.net>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Tejun Heo <tj@kernel.org>, Joe Perches <joe@perches.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] lib/vsprintf.c: Even faster decimal conversion
Date: Thu, 12 Mar 2015 13:49:24 -0500	[thread overview]
Message-ID: <20150312184924.GC94691@unpythonic.net> (raw)
In-Reply-To: <1426028472-19614-1-git-send-email-linux@rasmusvillemoes.dk>

On Wed, Mar 11, 2015 at 12:01:11AM +0100, Rasmus Villemoes wrote:
> Test and verification code on github
> <https://github.com/Villemoes/dec>.  It would be nice if someone could
> verify the code on architectures other than x86 - in particular, I
> believe it _should_ work on big-endian, but I have no way of testing
> that. Benchmark numbers would be nice too, of course.

Results from Odroid U3 (32-bit arm exynos 4412) with gcc 4.8.2 after some
trivial modifications (e.g., no -m32) (ubuntu 14.04ish, I think):

Distribution              Function         nsecs/conv   Conv/1 sec      
uniform([10, 2^64-1])     linux_put_dec          139.94          7050452
uniform([10, 2^64-1])     rv_put_dec             105.55          9278367
                          +/-                   -24.57%          +31.60%
3 + neg_binom(0.05)       linux_put_dec           69.35         14015175
3 + neg_binom(0.05)       rv_put_dec              53.00         18201548
                          +/-                   -23.58%          +29.87%
3 + neg_binom(0.10)       linux_put_dec           48.89         19798285
3 + neg_binom(0.10)       rv_put_dec              38.14         25056279
                          +/-                   -22.00%          +26.56%
3 + neg_binom(0.15)       linux_put_dec           40.69         23576136
3 + neg_binom(0.15)       rv_put_dec              31.60         30009858
                          +/-                   -22.33%          +27.29%
3 + neg_binom(0.20)       linux_put_dec           37.50         25633406
3 + neg_binom(0.20)       rv_put_dec              28.86         32689927
                          +/-                   -23.04%          +27.53%
3 + neg_binom(0.50)       linux_put_dec           28.93         33481454
3 + neg_binom(0.50)       rv_put_dec              20.11         45681278
                          +/-                   -30.47%          +36.44%

Raspberry pi 2 (32-bit ARM BCM2836) with debian jessie armhf (not
raspbian) using a copy of the gcc 4.8.2 binary:
Distribution              Function         nsecs/conv   Conv/1 sec      
uniform([10, 2^64-1])     linux_put_dec          301.66          3234768
uniform([10, 2^64-1])     rv_put_dec             224.33          4313939
                          +/-                   -25.63%          +33.36%
3 + neg_binom(0.05)       linux_put_dec          153.66          6221185
3 + neg_binom(0.05)       rv_put_dec             119.23          7938177
                          +/-                   -22.41%          +27.60%
3 + neg_binom(0.10)       linux_put_dec          117.47          8040480
3 + neg_binom(0.10)       rv_put_dec              91.78         10155002
                          +/-                   -21.87%          +26.30%
3 + neg_binom(0.15)       linux_put_dec          101.14          9254714
3 + neg_binom(0.15)       rv_put_dec              79.15         11632168
                          +/-                   -21.73%          +25.69%
3 + neg_binom(0.20)       linux_put_dec           91.49         10152753
3 + neg_binom(0.20)       rv_put_dec              71.55         12739461
                          +/-                   -21.80%          +25.48%
3 + neg_binom(0.50)       linux_put_dec           77.28         11790819
3 + neg_binom(0.50)       rv_put_dec              57.64         15372506
                          +/-                   -25.42%          +30.38%

and using 4.9.1:
Distribution              Function         nsecs/conv   Conv/1 sec      
uniform([10, 2^64-1])     linux_put_dec          324.76          3009495
uniform([10, 2^64-1])     rv_put_dec             250.85          3870099
                          +/-                   -22.76%          +28.60%
3 + neg_binom(0.05)       linux_put_dec          156.64          6090859
3 + neg_binom(0.05)       rv_put_dec             128.18          7364603
                          +/-                   -18.17%          +20.91%
3 + neg_binom(0.10)       linux_put_dec          120.54          7813490
3 + neg_binom(0.10)       rv_put_dec              99.73          9320708
                          +/-                   -17.26%          +19.29%
3 + neg_binom(0.15)       linux_put_dec          102.22          9116936
3 + neg_binom(0.15)       rv_put_dec              85.22         10778178
                          +/-                   -16.63%          +18.22%
3 + neg_binom(0.20)       linux_put_dec           94.56          9797719
3 + neg_binom(0.20)       rv_put_dec              77.60         11750535
                          +/-                   -17.94%          +19.93%
3 + neg_binom(0.50)       linux_put_dec           80.37         11379434
3 + neg_binom(0.50)       rv_put_dec              62.16         14339337
                          +/-                   -22.67%          +26.01%

Verify passed on the odroid, but I got bored and sent this mail before it finished on the rpi2.

Jeff

  parent reply	other threads:[~2015-03-12 19:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-20 23:51 [RFC] lib/vsprintf.c: Even faster decimal conversion Rasmus Villemoes
2015-03-05 15:22 ` Rasmus Villemoes
2015-03-05 16:03   ` Joe Perches
2015-03-05 16:10     ` Tejun Heo
2015-03-05 22:24       ` Rasmus Villemoes
2015-03-10 10:47         ` Rasmus Villemoes
2015-03-10 12:42           ` Tejun Heo
2015-03-10 12:57             ` Rasmus Villemoes
2015-03-10 23:01               ` [PATCH v1] " Rasmus Villemoes
2015-03-11 21:52                 ` Andrew Morton
2015-03-19 21:41                   ` Rasmus Villemoes
2015-03-12 18:49                 ` Jeff Epler [this message]
2015-03-13  0:08                 ` Jeff Epler
2015-03-13  0:30                   ` Jeff Epler
2015-03-13  8:58                 ` [PATCH] lib/vsprintf.c: silence sparse warnings about decpair[] initialization Rasmus Villemoes
2015-03-19 21:44                   ` [PATCH] lib/vsprintf.c: improve put_dec_trunc8 slightly Rasmus Villemoes
2015-03-18  0:50 ` [RFC] lib/vsprintf.c: Even faster decimal conversion Denys Vlasenko
2015-03-18  0:52   ` Denys Vlasenko
2015-03-18 17:10   ` Rasmus Villemoes

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=20150312184924.GC94691@unpythonic.net \
    --to=jepler@unpythonic.net \
    --cc=akpm@linux-foundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=peterz@infradead.org \
    --cc=tj@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.