Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751998AbbEKQzd (ORCPT ); Mon, 11 May 2015 12:55:33 -0400 Received: from ns.horizon.com ([71.41.210.147]:21739 "HELO ns.horizon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751490AbbEKQzb (ORCPT ); Mon, 11 May 2015 12:55:31 -0400 Date: 11 May 2015 12:55:29 -0400 Message-ID: <20150511165529.16509.qmail@ns.horizon.com> From: "George Spelvin" To: joe@perches.com, linux@horizon.com Subject: Re: [RFC PATCH] lib/vsprintf.c: Simplify uuid_string() Cc: linux-kernel@vger.kernel.org, linux@rasmusvillemoes.dk In-Reply-To: <1431362963.2884.37.camel@perches.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2096 Lines: 41 >From joe@perches.com Mon May 11 16:49:27 2015 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:541:599:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1538:1593:1594:1711:1714:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3351:3622:3865:3867:3870:3871:3872:3874:4321:4560:5007:6120:6261:10004:10400:10848:11026:11232:11658:11914:12517:12519:12740:13069:13311:13357:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: word26_8c684ad08ef5e X-Filterd-Recvd-Size: 1292 Subject: Re: [RFC PATCH] lib/vsprintf.c: Simplify uuid_string() From: Joe Perches To: George Spelvin Cc: linux@rasmusvillemoes.dk, linux-kernel@vger.kernel.org Date: Mon, 11 May 2015 09:49:23 -0700 In-Reply-To: <20150511163230.14333.qmail@ns.horizon.com> References: <20150511163230.14333.qmail@ns.horizon.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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. Joe Perches wrote: > shrinking code in vsprintf is always good > ? > *p++ = hex[byte >> 4]; > *p++ = hex[byte & 0x0f]; Arrgh! Yes, I ran into that compile problem already. I'd already made that change (I'm not quite Linus; I do *compile* my untested patches before posting them), but didn't commit it properly, and when I ran format-patch... :-( Since this seems to be a positive reaction, I'll put together a test harmess and make a proper submission. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/