From: geoff@collyer.net
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Clearing venti arena during install
Date: Sun, 26 Mar 2006 16:52:46 -0800 [thread overview]
Message-ID: <ac08f785796f92ca07123b65fd5d4335@collyer.net> (raw)
In-Reply-To: <7738cc425fad5f8b56882b45df4fdf6d@swtch.com>
Furthermore, the check for a zero block can be done pretty cheaply (I
thought about doing this years ago for v7 Unix). First see if the
first word of the buffer is zero; if so, see if the last word is zero;
if so, run through the buffer a word at a time, stopping at a non-zero
word or end of buffer.
In the common (real-life) case, the test of the first word suffices.
The word-at-a-time scan can be made to run fairly fast, especially if
you have the option of first putting a non-zero word just after the
buffer, so that no explicit bounds test is necessary in the loop.
next prev parent reply other threads:[~2006-03-27 0:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-26 21:04 bakul+plan9
2006-03-27 0:09 ` Russ Cox
2006-03-27 0:23 ` bakul+plan9
2006-03-27 0:30 ` Russ Cox
2006-03-27 0:33 ` Russ Cox
2006-03-27 0:52 ` geoff [this message]
2006-03-27 0:57 ` Russ Cox
2006-03-27 1:23 ` Bakul Shah
2006-04-17 9:57 ` Lluís Batlle i Rossell
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=ac08f785796f92ca07123b65fd5d4335@collyer.net \
--to=geoff@collyer.net \
--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).