From: Lucio De Re <lucio@proxima.alt.za>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Ugly hack
Date: Sun, 16 Feb 2003 14:18:59 +0200 [thread overview]
Message-ID: <20030216141859.N9084@cackle.proxima.alt.za> (raw)
In-Reply-To: <20030216112527.M9084@cackle.proxima.alt.za>; from Lucio De Re on Sun, Feb 16, 2003 at 11:25:27AM +0200
On Sun, Feb 16, 2003 at 11:25:27AM +0200, Lucio De Re wrote:
>
> Oops! Here's a clearer patch:
>
> term% diff glob.c `{yesterday glob.c}
> 69c69
> < while(Readdir(f, namep, dironly||namep[1]!=0)){
> ---
> > while(Readdir(f, namep, dironly)){
>
And here's one that actually doesn't break globbing:
term% diff glob.c `{yesterday glob.c}
69c69
< while(Readdir(f, namep, dironly||*newp=='/')){
---
> while(Readdir(f, namep, dironly)){
term%
> PS: I don't know how important it is to check whether there actually
> is a speed improvement when expanding big directories.
Error discovered while trying to display /bin/*/* for timing
purposes. I still don't know if there is a speed improvement.
But if the following is anything to go by:
term% time rc -c 'echo /bin/*/* > /tmp/out.2'
0.02u 0.31s 1.18r rc -c echo /bin/*/* > /tmp/out.1
term% time /sys/src/cmd/rc/8.out -c 'echo /bin/*/* > /tmp/out.2'
0.03u 0.08s 0.27r /sys/src/cmd/rc/8.out -c echo /bin/*/* > /tmp/out.2
term%
it looks pretty much a worthwhile improvement.
++L
next prev parent reply other threads:[~2003-02-16 12:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-15 15:46 Lucio De Re
2003-02-15 16:18 ` Sam
2003-02-15 16:21 ` Dan Cross
2003-02-15 16:29 ` Lucio De Re
2003-02-15 23:56 ` Geoff Collyer
2003-02-16 9:20 ` Lucio De Re
2003-02-16 9:25 ` Lucio De Re
2003-02-16 12:18 ` Lucio De Re [this message]
2003-02-16 12:45 ` Lucio De Re
2003-02-16 14:19 ` Russ Cox
2003-02-16 15:00 ` Lucio De Re
2003-02-16 15:31 ` David Butler
2003-02-16 15:40 ` Russ Cox
2003-02-17 5:27 ` Lucio De Re
2003-02-17 9:53 ` John Kodis
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=20030216141859.N9084@cackle.proxima.alt.za \
--to=lucio@proxima.alt.za \
--cc=9fans@cse.psu.edu \
/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;
as well as URLs for NNTP newsgroup(s).