From: Elias Pipping <pipping@mi.fu-berlin.de>
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
Date: Tue, 16 Oct 2007 04:32:19 +0200 [thread overview]
Message-ID: <20071016023219.GA24130@macbook.local> (raw)
In-Reply-To: <ff16ib$t43$1@ger.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1779 bytes --]
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)
> >
> It doesn't: find will just execute the command as many times as needed (each
> time with an argument length maximally less than ARG_MAX. Well, it did when
> 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
[-- Attachment #2: Type: application/pgp-signature, Size: 186 bytes --]
prev parent reply other threads:[~2007-10-16 2:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1IhKZ7-000421-Hg@stork.gentoo.org>
2007-10-15 7:42 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-misc/note: ChangeLog note-1.3.3.ebuild Donnie Berkholz
2007-10-15 7:56 ` Bo Ørsted Andresen
2007-10-15 8:01 ` Donnie Berkholz
2007-10-15 8:40 ` Roy Marples
2007-10-15 8:07 ` Ulrich Mueller
2007-10-15 8:35 ` Roy Marples
2007-10-15 8:43 ` Fabian Groffen
2007-10-15 9:07 ` Roy Marples
2007-10-15 22:43 ` [gentoo-dev] " Steve Long
2007-10-15 23:48 ` Gilles Dartiguelongue
2007-10-16 2:14 ` [gentoo-dev] " Steve Long
2007-10-16 2:32 ` Elias Pipping [this message]
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=20071016023219.GA24130@macbook.local \
--to=pipping@mi.fu-berlin.de \
--cc=gentoo-dev@lists.gentoo.org \
/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