From: Joe Perches <joe@perches.com>
To: George Spelvin <linux@horizon.com>
Cc: linux@rasmusvillemoes.dk, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] lib/vsprintf.c: Simplify uuid_string()
Date: Mon, 11 May 2015 09:49:23 -0700 [thread overview]
Message-ID: <1431362963.2884.37.camel@perches.com> (raw)
In-Reply-To: <20150511163230.14333.qmail@ns.horizon.com>
On Mon, 2015-05-11 at 12:32 -0400, George Spelvin wrote:
> I suspect it's a speedup, but since this is not hot code, the important
> part is that it shrinks the function from 332 to 256 bytes.
shrinking code in vsprintf is always good
> diff --git a/lib/vsprintf.c b/lib/vsprintf.c
[]
> for (i = 0; i < 16; i++) {
> - p = hex_byte_pack(p, addr[index[i]]);
> + u8 byte = addr[index[i]];
> + *p++ = hex[x >> 4];
> + *p++ = hex[x & 0x0f];
?
*p++ = hex[byte >> 4];
*p++ = hex[byte & 0x0f];
next prev parent reply other threads:[~2015-05-11 16:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-11 16:32 [RFC PATCH] lib/vsprintf.c: Simplify uuid_string() George Spelvin
2015-05-11 16:49 ` Joe Perches [this message]
2015-05-11 16:55 ` George Spelvin
2015-05-11 19:53 ` [PATCH 1/2] " George Spelvin
2015-05-11 19:55 ` [PATCH 2/2] lib/vsprintf.c: Further simplify uuid_string() George Spelvin
2015-05-12 2:14 ` Joe Perches
2015-05-12 9:10 ` [PATCH 2/2 v2] " George Spelvin
2015-05-12 11:26 ` Rasmus Villemoes
2015-05-12 13:57 ` George Spelvin
2015-05-12 16:59 ` Joe Perches
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=1431362963.2884.37.camel@perches.com \
--to=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@horizon.com \
--cc=linux@rasmusvillemoes.dk \
/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