Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Mar 2003 09:57:35 +0100
From:      des@ofug.org (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=)
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Nate Lawson <nate@root.org>
Subject:   Re: Checksum/copy
Message-ID:  <xzp7kalw5j4.fsf@flood.ping.uio.no>
In-Reply-To: <20030327180247.D1825@gamplex.bde.org> (Bruce Evans's message of "Thu, 27 Mar 2003 19:07:15 %2B1100 (EST)")
References:  <Pine.BSF.4.21.0303260956250.27748-100000@root.org> <20030326225530.G2075@odysseus.silby.com> <20030327180247.D1825@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans <bde@zeta.org.au> writes:
> I spent a lot of time on this about 7 years ago.  See ~bde/cache on
> freefall for old versions of programs that try lots of different
> copy/read/write checksum methods.  Better hardware made the differences
> between various methods relatively small.  One can probably do better
> (50%?) for largish (1K+ ?) buffers using SSE instructions on i386's
> now.

Might it be a good idea to have separate b{copy,zero} implementations
for special purposes like pmap_{copy,zero}_page?  Since these cases
copy or zero a fixed and relatively large amount of data, they should
lend themselves well to optimization.  Zeroing a 4096-byte page on an
SSE-enabled i386 should take no more than 35 SSE instructions (one to
save the contents of the register, one to zero the register, 32 to
actually zero the page and one to restore the previous contents of the
register) and a handful of fast integer instructions for setup.

DES
--=20
Dag-Erling Sm=F8rgrav - des@ofug.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzp7kalw5j4.fsf>