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

Andreas Nahr ClassDevelopment at A-SoftTech.com
Fri Mar 17 19:09:20 EST 2006


Note to self: Wait a few minutes before sending your posts in case you have 
forgotten something ;)

Just wanted to say that I do not get the "strange Result" if I compile with 
csc (which somehow makes it even more strange ;)

Test: Length: 0, Source: 0, Dest: 1
  memcopy      : 563
  CharCopy     : 344
  CC autoalign : 437
  CC aligned   : 359
Test: Length: 1, Source: 0, Dest: 1
  memcopy      : 563
  CharCopy     : 375
  CC autoalign : 437
  CC aligned   : 360
Test: Length: 100, Source: 0, Dest: 1
  memcopy      : 1531
  CharCopy     : 922
  CC autoalign : 969
  CC aligned   : 1187
Test: Length: 10000, Source: 0, Dest: 1
  memcopy      : 906
  CharCopy     : 547
  CC autoalign : 532
  CC aligned   : 781

Andreas

>> 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.
>>
>> Test: Length: 100, Source: 0, Dest: 1
>>  memcopy      : 984
>>  CharCopy     : 625
>>  CC autoalign : 641
>>  CC aligned   : 890                  <----------------------------------
>> Already weired
>> Test: Length: 10000, Source: 0, Dest: 1
>>  memcopy      : 547
>>  CharCopy     : 469
>>  CC autoalign : 469
>>  CC aligned   : 687                  <----------------------------------
>> Extremely strange
>>
>> However somebody who understands more about alignment than me (+ mono
>> unmanaged internals) has to look over it.
>> It should then be simple to replace the current implementation.
>> The Microbenchmark containing the Implementation is attached.




More information about the Mono-devel-list mailing list