From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mo-p00-ob.rzone.de (mo-p00-ob.rzone.de [81.169.146.161]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id oBAKqKXV005130 for ; Fri, 10 Dec 2010 15:52:21 -0500 (EST) X-RZG-AUTH: :JiIXek6mfvEEUpFQdo7Fj1/zg48CFjWjQv0cW+St/nW/afgnrylriWNGMFgNH4A= X-RZG-CLASS-ID: mo00 Received: from britannica.bec.de (ip-109-42-33-136.web.vodafone.de [109.42.33.136]) by post.strato.de (fruni mo46) (RZmta 24.8) with (DHE-RSA-AES128-SHA encrypted) ESMTP id D005f8mBAJrX98 for ; Fri, 10 Dec 2010 21:52:17 +0100 (MET) Received: by britannica.bec.de (sSMTP sendmail emulation); Fri, 10 Dec 2010 21:52:03 +0100 Date: Fri, 10 Dec 2010 21:52:03 +0100 From: Joerg Sonnenberger To: tech@mdocml.bsd.lv Subject: Re: roff.c question Message-ID: <20101210205203.GA30244@britannica.bec.de> Mail-Followup-To: tech@mdocml.bsd.lv References: <4CF678F0.6020304@bsd.lv> <20101201212834.GA22990@iris.usta.de> <4CF77A2B.6020702@bsd.lv> <4CF79F45.6080105@bsd.lv> <20101202225019.GD12188@iris.usta.de> <20101203214929.GB28384@iris.usta.de> <4CFBAC80.1060004@bsd.lv> <20101208010527.GA25360@iris.usta.de> <4D01F5A4.8010300@bsd.lv> <20101210204513.GB18607@iris.usta.de> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101210204513.GB18607@iris.usta.de> User-Agent: Mutt/1.5.20 (2009-06-14) On Fri, Dec 10, 2010 at 09:45:13PM +0100, Ingo Schwarze wrote: > If we want to go into micro-optimization, we could do this: > > for (cp = *bufp + pos; *cp; cp++) { > if ('\\' != *cp) > continue; ... or use a single strchr() call to start the search. For the typical case of medium long lines and no \, strchr can operate mostly on dwords... Joerg -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv