[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1431362963.2884.37.camel@perches.com>
Date: Mon, 11 May 2015 09:49:23 -0700
From: Joe Perches <joe@...ches.com>
To: George Spelvin <linux@...izon.com>
Cc: linux@...musvillemoes.dk, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] lib/vsprintf.c: Simplify uuid_string()
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];
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists