[Mono-dev] New (faster) Implementaiton for managed CharCopy

Paolo Molaro lupus at ximian.com
Mon Mar 20 10:51:53 EST 2006


On 03/18/06 Andreas Nahr wrote:
> Quick summary: with one exception (which I ABSOLUTELY don't understand why) 
> ALL new Implementations are always faster, sometimes more than twice as 
> fast as current. The best overall is CharCopy autoalign. However I'm not 
> sure if this would work on non-x86 Platforms, but CC aligned should always 
> work if I understand the alignment issues right.

Unaligned loads and stores are unacceptable, since they break at least
sparc and arm.
The current memcpy() was done because it is a compromise between speed
and code bloat. You could certainly unroll some more for some speed
gains.
If you can provide significant gains with little code bloat in the
current methods, please do, but we're not going to add additional
specialized memory copy routines.
memcpy is used also by the runtime and your methods only deal with
chars, so they are not a replacement.
The way to speedup the code is to implement arch-specific hand-coded
managed implementations in the jit.

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better



More information about the Mono-devel-list mailing list