Encouraging preliminary results implementing memcpy in D

Mike Franklin slavo5150 at yahoo.com
Wed Jun 13 11:51:45 UTC 2018


On Wednesday, 13 June 2018 at 08:55:40 UTC, drug wrote:
> Ubuntu 18.04 Linux 4.15.0-23-generic
> AMD® Fx(tm)-8350 eight-core processor × 8
>
> size memcpyC memcpyD
> 1 51089 36921
> 2 45896 35733
> 4 46079 36200
> 8 48443 37509
> 16 48669 24925
> 32 52917 27787
> 64 55631 44928
> 128 84282 47795
> 256 107350 66009
> 512 159310 126795
> 1024 247683 452560
> 2048 440687 673211
> 4096 1129135 1304085
> 8192 4740910 4095254
> 16384 8389579 8874273
> 32768 16630336 17370310
> 65536 33032013 42904705
>
> size memcpyC memcpyD
> 1 52354 28365
> 1 48407 28445
> 1 50264 30273
> 2 51312 27708
> 2 46138 28973
> 4 52753 28535
> 4 52150 27418
> 8 52220 27276
> 8 49625 27804
> 4 49356 33510
> 8 48529 27668
> 16 52662 135357

Interesting! I have an AMD 8370 running Windows 8, and I get more 
favorable results in Windows:

size memcpyC memcpyD
1 45361 43626
2 55091 43791
4 70507 43714
8 50910 42854
16 63328 28831
32 72817 30790
64 76307 45823
128 97180 55368
256 164935 68362
512 230508 132100
1024 502189 490590
2048 892968 823070
4096 1896480 1456353
8192 4530645 4516681
16384 10886602 9921215
32768 21717080 19116839
65536 59787610 43549445

size memcpyC memcpyD
1 48770 30084
1 49169 30921
1 43370 30144
2 51404 27571
2 56002 29729
4 69588 29804
4 63743 29510
8 55492 29002
8 46752 31793
4 72673 28858
8 48989 27547
10 55527 121628

In your results, I see that for sizes 1024 and higher (that's 
when is dispatches to the REP MOVSB algorithm), the performance 
begins to degrade for Linux.  I'm going to install Linux soon and 
see if I can fix that.

Thanks for the data,

Mike


More information about the Digitalmars-d-announce mailing list