From: Peter Schay <pschay@pobox.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] env walk
Date: Wed, 9 May 2001 15:45:14 +0000 [thread overview]
Message-ID: <3AF962AB.10E95C78@pobox.com> (raw)
In-Reply-To: <20010509132356.1923D199F0@mail.cse.psu.edu>
As far as I can tell, the loop I proposed in envwalk() is a
linear search to walk to an environment variable.
The devwalk+envgen algorithm is n squared because the loop in envgen
is nested within the loop in devwalk. It's amazing how that tiny
little loop in envgen can eat up time!
Pete
presotto@plan9.bell-labs.com wrote:
>
> All the devices that use devwalk have n squared behavior. It wasn't
> supposed to be a problem because n isn't supposed to be large for them.
> I agree that it's short sighted for something with potentially many files
> like #e. Your solution is also O(n**2), though the constant
> is much smaller (no devdir inside the loop). I'll replace the devwalk
> with your search and put it on the next update wrap.
>
> Also, on network performance, we played a bunch with TCP speed after
> Dong Lin showed us how slow we were. Last we tested our TCP stack,
> we came out somewhere between Linux and FreeBSD in speed between 2
> 500 MHZ Pentiums on a 100meg ether. That's partially why loopbackmedium
> appeared, to see how much was stack and how much driver. I'll run
> a new set of tests in a few weeks and post when I'm done.
> Since both all 3 OS's are moving targets, the validity
> of the tests is transient. Sic transit perfunctio.
next prev parent reply other threads:[~2001-05-09 15:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-09 13:23 presotto
2001-05-09 15:45 ` Peter Schay [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-05-10 14:48 rog
2001-05-10 14:41 presotto
2001-05-10 13:49 rob pike
2001-05-10 13:39 rog
2001-05-10 13:04 presotto
2001-05-10 12:58 presotto
2001-05-09 16:58 presotto
2001-05-09 17:34 ` Sam
2001-05-09 17:39 ` Sam
2001-05-10 8:33 ` Peter Schay
2001-05-09 11:54 Peter Schay
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=3AF962AB.10E95C78@pobox.com \
--to=pschay@pobox.com \
--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).