public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Peter Volkov <pva@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [gentoo-commits] gentoo-x86 commit in dev-lang/python: ChangeLog python-2.6.ebuild python-2.5.2-r6.ebuild
Date: Thu, 16 Oct 2008 09:14:20 +0400	[thread overview]
Message-ID: <1224134060.5370.42.camel@localhost> (raw)
In-Reply-To: <gd5iad$hmo$1@ger.gmane.org>

В Срд, 15/10/2008 в 20:51 +0100, Steve Long пишет:
> >> for ((i=0;i<100000;i++)); do echo /usr/share/doc/${P}/examples >
> >> /dev/null;
> > 
> >> real 11.25
> > 
> >> real 9.24
> > 
> > So that's what, on the order of 20 microseconds faster for each iteration?
> >
> Or ~18%. (You shouldn't use the first iteration in general, btw.)

Steve, your example only tests how much time bash takes to parse string.
It's obvious that in quoted strings some expansions could be avoided and
thus bash works faster. But although ebuilds use bash syntax they are
interpreted not only by bash - the time to parse stings is negligible to
other activities. I have not calculated but made a rough estimation
taking into account the number of ebuilds in the tree. So I think we
have of order of 10^6 string. This means that during merge of all
packages we'll win 10 seconds. I don't think it's worth to consider this
gain.

So in portage tree this is the matter of style. That's said, since
personally I don't have any preference on this style and until there
will be arguments not to use this style I'll start to use full quotation
of the strings.

And yes, in pure bash programs possibly this'll make sense.

-- 
Peter.




  parent reply	other threads:[~2008-10-16  5:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1KmHuG-0004gf-6v@stork.gentoo.org>
2008-10-05 19:27 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-lang/python: ChangeLog python-2.6.ebuild python-2.5.2-r6.ebuild Thomas Sachau
2008-10-05 19:48   ` Ulrich Mueller
2008-10-05 20:00     ` Ciaran McCreesh
2008-10-06 12:10   ` [gentoo-dev] " Ali Polatel
2008-10-13  2:59   ` [gentoo-dev] Re: [gentoo-commits] " Steve Long
2008-10-13  8:23     ` Jan Kundrát
2008-10-15  9:33       ` [gentoo-dev] " Steve Long
2008-10-15 10:39         ` Fernando J. Pereda
2008-10-15 19:28           ` [gentoo-dev] " Steve Long
2008-10-15 19:43             ` Ciaran McCreesh
2008-10-16 21:01               ` [gentoo-dev] " Steve Long
2008-10-16 21:25                 ` Ciaran McCreesh
2008-10-16 21:33                 ` Fernando J. Pereda
2008-10-15 17:19         ` [gentoo-dev] " David Leverton
2008-10-15 19:51           ` [gentoo-dev] " Steve Long
2008-10-15 20:10             ` Ciaran McCreesh
2008-10-15 20:44             ` Fernando J. Pereda
2008-10-16  3:20             ` Arun Raghavan
2008-10-16 20:29               ` [gentoo-dev] " Steve Long
2008-10-16  5:14             ` Peter Volkov [this message]
2008-10-16 20:46               ` [gentoo-dev] " Steve Long
2008-10-17 11:06             ` [gentoo-dev] Re: " David Leverton
2008-10-14  5:43     ` [gentoo-dev] " Ryan Hill

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=1224134060.5370.42.camel@localhost \
    --to=pva@gentoo.org \
    --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