From: roma1390 <roma1390@gmail.com>
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Douglas W Jones <jones@cs.uiowa.edu>,
Michal Nazarewicz <mnazarewicz@google.com>
Subject: Re: [PATCH 0/1] vsprintf: optimize decimal conversion (again)
Date: Wed, 28 Mar 2012 13:31:47 +0300 [thread overview]
Message-ID: <4F72E893.9070502@gmail.com> (raw)
In-Reply-To: <201203281213.07856.vda.linux@googlemail.com>
On 2012.03.28 13:13, Denys Vlasenko wrote:
> Third: switch to algorithm #1 and test whether it fares better.
> To do that, go to test_new.c
> and replace
> #if LONG_MAX> ((1UL<<31)-1) || LLONG_MAX> ((1ULL<<63)-1)
> with
> #if 1 ////LONG_MAX> ((1UL<<31)-1) || LLONG_MAX> ((1ULL<<63)-1)
> (there are two instances of this line there),
> then recompile and rerun the test, and post the result.
After applied following diff:
--- test_new.org.c 2012-03-28 13:25:14.000000000 +0300
+++ test_new.c 2012-03-28 13:25:30.000000000 +0300
@@ -7,7 +7,7 @@
* (with permission from the author, Douglas W. Jones).
*/
-#if LONG_MAX > ((1UL<<31)-1) || LLONG_MAX > ((1ULL<<63)-1)
+#if 1 ////LONG_MAX > ((1UL<<31)-1) || LLONG_MAX > ((1ULL<<63)-1)
/* Formats correctly any integer in [0, 999999999] */
static noinline_for_stack
char *put_dec_full9(char *buf, unsigned q)
@@ -106,7 +106,7 @@
* Else (if long is 32 bits and long long is 64 bits) we use second one.
*/
-#if LONG_MAX > ((1UL<<31)-1) || LLONG_MAX > ((1ULL<<63)-1)
+#if 1 ///LONG_MAX > ((1UL<<31)-1) || LLONG_MAX > ((1ULL<<63)-1)
/* First algorithm: generic */
I have following compile output:
$ arm-linux-gnueabi-gcc -O2 -Wall test_new.c -o test_new
test_new.c: In function ‘number’:
test_new.c:118: error: impossible constraint in ‘asm’
test_new.c:118: error: impossible constraint in ‘asm’
test_new.c:118: error: impossible constraint in ‘asm’
but affter this diff:
--- test_new-with-ifdefs.c 2012-03-28 13:29:04.000000000 +0300
+++ test_new.c 2012-03-28 13:29:12.000000000 +0300
@@ -1,4 +1,4 @@
-#include "test_header.c"
+#include "test_header_arm.c"
/* Decimal conversion is by far the most typical, and is used
* for /proc and /sys data. This directly impacts e.g. top performance
compiles fine.
result are:
./test_new2
Conversions per second: 8:5420000 123:4452000 123456:3556000 12345678:3368000
123456789:2904000 2^32:2412000 2^64:1556000
Conversions per second: 8:5428000 123:4500000 123456:3644000 12345678:3328000
123456789:2832000 2^32:2408000 2^64:1572000
Conversions per second: 8:5372000 123:4396000 123456:3644000 12345678:3368000
123456789:2900000 2^32:2392000 2^64:1532000
Conversions per second: 8:5424000 123:4500000 123456:3608000 12345678:3284000
123456789:2896000 2^32:2416000 2^64:1572000
btw: previovios version (test_new) still running, now is at:
Tested 2446852096
roma1390
next prev parent reply other threads:[~2012-03-28 10:31 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-26 18:47 [PATCH 0/1] vsprintf: optimize decimal conversion (again) Denys Vlasenko
2012-03-26 18:51 ` [PATCH 1/1] " Denys Vlasenko
2012-03-26 19:51 ` Andrew Morton
2012-03-26 19:56 ` Denys Vlasenko
2012-03-26 20:13 ` Andrew Morton
2012-03-26 20:18 ` Geert Uytterhoeven
2012-03-26 23:18 ` Denys Vlasenko
2012-03-27 0:30 ` Denys Vlasenko
2012-03-27 3:49 ` H. Peter Anvin
2012-03-26 20:20 ` H. Peter Anvin
2012-03-27 17:12 ` Michal Nazarewicz
2012-03-27 17:17 ` H. Peter Anvin
2012-03-27 0:26 ` Denys Vlasenko
2012-03-27 12:08 ` [PATCH 0/1] " roma1390
2012-03-27 15:32 ` Denys Vlasenko
2012-03-27 15:42 ` Denys Vlasenko
2012-03-28 5:56 ` roma1390
2012-03-28 10:13 ` Denys Vlasenko
2012-03-28 10:24 ` roma1390
2012-03-28 10:33 ` Denys Vlasenko
2012-03-28 10:39 ` roma1390
2012-03-28 11:20 ` Denys Vlasenko
2012-03-29 10:35 ` Denys Vlasenko
2012-03-28 10:31 ` roma1390 [this message]
2012-03-28 11:23 ` Denys Vlasenko
2012-03-29 5:23 ` roma1390
2012-03-29 10:33 ` Denys Vlasenko
2012-03-27 13:49 ` roma1390
2012-03-27 15:33 ` Denys Vlasenko
2012-03-29 5:16 ` roma1390
2012-03-29 10:33 ` 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=4F72E893.9070502@gmail.com \
--to=roma1390@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=jones@cs.uiowa.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=mnazarewicz@google.com \
--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 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.