From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1IhcR2-0006y0-Te for garchives@archives.gentoo.org; Tue, 16 Oct 2007 02:45:33 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.1/8.14.0) with SMTP id l9G2YS7C007120; Tue, 16 Oct 2007 02:34:28 GMT Received: from math.fu-berlin.de (leibniz.math.fu-berlin.de [160.45.40.10]) by robin.gentoo.org (8.14.1/8.14.0) with ESMTP id l9G2WYJr004844 for ; Tue, 16 Oct 2007 02:32:34 GMT Received: (qmail 4061 invoked from network); 16 Oct 2007 04:32:32 +0200 Received: From lists.math-berlin.de (160.45.117.155) by leibniz.math.fu-berlin.de with (AES256-SHA encrypted) SMTP; 16 Oct 2007 02:32:32 -0000 Received: from p54bfe162.dip.t-dialin.net ([84.191.225.98] helo=localhost) by lists.math-berlin.de with esmtpsa (Exim 4.63 #1 (Debian)) id 1IhcES-00050r-I5 for ; Tue, 16 Oct 2007 04:32:33 +0200 Date: Tue, 16 Oct 2007 04:32:19 +0200 From: Elias Pipping To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Re: Re: Re: [gentoo-commits] gentoo-x86 commit in app-misc/note: ChangeLog note-1.3.3.ebuild Message-ID: <20071016023219.GA24130@macbook.local> Mail-Followup-To: gentoo-dev@lists.gentoo.org References: <20071015074250.GG23990@supernova> <200710150956.05673.bo.andresen@zlin.dk> <1192437335.1277.1.camel@uberlaptop.development.ltl> <20071015084353.GF30883@gentoo.org> <1192439259.1277.9.camel@uberlaptop.development.ltl> <1192492093.31537.2.camel@su.perronet.esiee.net> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) X-Remote-IP: 84.191.225.98 X-Archives-Salt: 4ab7f0ef-c10f-4935-9031-e7a5cdd73b0b X-Archives-Hash: a2b99f117a01f52973590340bc14733e --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 16, 2007 at 03:14:12AM +0100, Steve Long wrote: > Gilles Dartiguelongue wrote: > > I haven't reread the fine mans for a while but iirc, + could lead you to > > hit the argument buffer limit of your shell. xargs has --max-args to get > > around that and is also way faster than any -exec variant (at least > > that's what the bench I did on a PIV2.6Ghz showed me about 4 months ago) > >=20 > It doesn't: find will just execute the command as many times as needed (e= ach > time with an argument length maximally less than ARG_MAX. Well, it did wh= en > we tested this a couple of months ago.) So it's optimal in that sense. I > have no idea on the timing measurements, but I don't like pipes and > subshells as a rule (externals are bad enough!;>) It'd be interesting to > see measurements over 100000 loops with long argument lists requiring > multiple invocations per pass, I suppose. Here's a quick benchmark: % \ repeat 3 \time find -name '*.ebuild' | xargs cat >/dev/null; echo; \ repeat 3 \time find -name '*.ebuild' -exec cat {} ';' >/dev/null; echo; \ repeat 3 \time find -name '*.ebuild' -exec cat {} '+' >/dev/null 66.28 real 0.77 user 4.71 sys 30.95 real 0.76 user 4.73 sys 30.08 real 0.76 user 4.67 sys 174.72 real 18.10 user 112.92 sys 208.69 real 18.07 user 117.05 sys 173.64 real 18.10 user 110.79 sys 62.61 real 1.26 user 10.88 sys 54.98 real 1.25 user 10.46 sys 41.84 real 1.25 user 10.00 sys the third variant doesn't get any faster than on the last line. ( tested in zsh, with bsd time and gnu find ) -- Elias --UugvWAfsgieZRqgk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (Darwin) iD8DBQFHFCKzS+adM7q0k+QRAu+hAJ9l0oSYminqxsOtrP4oROmgGf2u9gCfTLM7 Ragd1CczJXMu5xh/YkdyjAs= =mD0X -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk-- -- gentoo-dev@gentoo.org mailing list