Date: Fri, 4 May 2012 09:44:15 +1000 From: Andrew Reilly <areilly@bigpond.net.au> To: Luigi Rizzo <rizzo@iet.unipi.it> Cc: current@freebsd.org, net@frebsd.org Subject: Re: fast bcopy... Message-ID: <20120503234356.GD26284@johnny.reilly.home> In-Reply-To: <20120502182557.GA93838@onelab2.iet.unipi.it> References: <20120502182557.GA93838@onelab2.iet.unipi.it>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 02, 2012 at 08:25:57PM +0200, Luigi Rizzo wrote: > as part of my netmap investigations, i was looking at how > expensive are memory copies, and here are a couple of findings > (first one is obvious, the second one less so) Most C compilers (well, the ones I regularly use) inline small, constant-length memcpy operations of the sort you're describing here. I would expect techniques like that to beat any amount of hand-tuning in a elf-linkage bcopy subroutine. Sure, you want a good implementation for your variable-length copies, and data layout and alignment is tremendously important these days, so there's no single silver bullet here. Cheers, -- Andrew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120503234356.GD26284>