Hi,

is it better (regarding the performance) to copy one large buffer via
RtlCopyMemory or to copy some small buffer several times?
Is there a tool that can do performance monitoring for drivers?

Thanks a lot
Peter

Re: Performance question by Stephan

Stephan
Mon Sep 20 15:53:36 CDT 2004

On Sun, 19 Sep 2004 22:43:01 -0700, "Peter Schmitz"
<PeterSchmitz@discussions.microsoft.com> wrote:

>is it better (regarding the performance) to copy one large buffer via
>RtlCopyMemory or to copy some small buffer several times?

One large buffer. Note that the alignment of the source and
destination buffer addresses plays a major role here. If possible,
align them both on the machine's "natural" word size, i.e. on an
address that is an intetgral multiple of four (eight for 64-bit
machines).

Buffer copies are implemented as REP MOVS processor instructions on
x86.

>Is there a tool that can do performance monitoring for drivers?

Many, e.g.

KERNRATE (free)
http://www.microsoft.com/whdc/driver/perform/drvperf.mspx

(Download Kernrate here:
http://www.microsoft.com/whdc/system/sysperf/krview.mspx)

Intel's offers an eval of their VTune tool:

http://www.intel.com/software/products/vtune/

Stephan