Skip to content

hevz/mem-bench

Repository files navigation

Memory set/cpy/move benchmarks

Hardware

Loongson-3a5000 quad-core machine (2.3GHz)

Software

Arch Linux glibc 2.37-1

Results

  • length: byte
  • speed: MB/s

Memset

length src offset dst offset speed glibc speed int speed lsx speed lasx
1 0 0 60.652 218.250 218.328 218.318
1 0 8 60.669 218.378 218.388 218.393
1 0 9 60.660 218.398 218.398 218.393
8 0 0 412.594 1746.123 1746.384 1746.685
8 0 8 413.698 1747.126 1747.187 1747.126
8 0 9 286.426 1747.147 1747.187 1747.167
16 0 0 815.275 3505.264 3504.821 3504.941
16 0 8 809.246 3505.828 3505.787 3505.908
16 0 9 565.482 3505.949 3505.908 3505.425
24 0 0 1142.245 5248.999 5249.688 5252.446
24 0 8 1142.343 5253.998 5254.774 5254.774
24 0 9 834.102 5254.861 5254.516 5254.602
32 0 0 1491.729 6371.232 7009.423 7008.387
32 0 8 1491.896 6374.371 7010.688 7010.919
32 0 9 1062.416 7011.840 7011.494 7011.609
64 0 0 3286.221 12529.343 12744.367 14019.305
64 0 8 3291.236 12748.171 10787.323 14023.219
64 0 9 2003.458 14021.377 10787.596 14021.837
300 0 0 10042.752 17299.259 34581.784 50545.663
300 0 8 10029.193 17300.829 32863.175 50556.832
300 0 9 8134.590 17303.184 32873.563 50559.067
1200 0 0 15185.390 17512.956 35007.144 69062.720
1200 0 8 15191.780 17518.770 34578.356 69118.388
1200 0 9 14055.361 17402.775 34581.842 69167.171
4000 0 0 16749.039 17517.661 35035.725 70082.721
4000 0 8 16758.058 17528.534 34918.600 69533.102
4000 0 9 16338.469 17492.344 34917.800 69545.786
8000 0 0 16955.463 17529.143 35062.114 70100.866
8000 0 8 16958.574 17535.087 33818.085 65500.215
8000 0 9 16732.202 17518.474 33818.460 65510.059

Memcpy

length src offset dst offset speed glibc speed int speed lsx speed lasx
1 0 0 50.787 198.487 198.496 218.368
1 0 8 50.791 198.504 198.525 218.393
1 0 9 50.792 198.545 198.547 218.401
8 0 0 335.966 1588.015 1587.981 1746.665
8 0 8 336.007 1588.347 1588.347 1746.986
8 0 9 336.006 1588.214 1588.363 1747.167
16 0 0 604.424 3186.477 3185.778 3505.264
16 0 8 604.483 3187.109 3186.910 3395.453
16 0 9 501.050 3187.076 3187.143 3505.908
24 0 0 921.829 4775.122 4775.407 5252.618
24 0 8 921.919 4776.761 4776.904 5254.774
24 0 9 740.110 4777.118 4776.262 5254.429
32 0 0 1230.012 5006.977 6368.952 7006.317
32 0 8 1230.168 5008.151 6373.991 7011.840
32 0 9 973.859 5393.117 6374.371 7011.494
64 0 0 2298.826 9692.430 10010.667 14011.715
64 0 8 2299.030 10016.773 10786.097 14023.679
64 0 9 1775.169 10780.514 10787.323 14022.989
300 0 0 6993.178 17296.382 33410.239 43794.503
300 0 8 6994.076 17299.782 27354.678 43826.380
300 0 9 4792.205 15654.720 27226.427 43821.344
1200 0 0 13004.986 17505.805 34531.360 62460.166
1200 0 8 13011.152 17520.112 27758.670 40400.471
1200 0 9 7964.797 15552.029 27874.848 38513.362
4000 0 0 15873.016 17497.562 34893.831 69902.824
4000 0 8 15877.974 17508.209 27894.130 41599.607
4000 0 9 9148.500 15568.055 27947.806 41288.751
8000 0 0 16487.970 17288.862 35015.034 69796.170
8000 0 8 16489.396 17273.201 27385.088 40232.083
8000 0 9 9566.662 15539.054 27469.658 39854.741

Memmove

length src offset dst offset speed glibc speed int speed lsx speed lasx
1 0 0 50.781 198.427 198.496 198.475
1 0 8 50.366 198.539 198.537 198.539
1 0 9 50.793 198.545 198.543 198.550
8 0 0 317.657 1587.981 1587.899 1587.617
8 0 8 317.681 1588.347 1588.347 1588.297
8 0 9 317.684 1588.380 1588.330 1588.347
16 0 0 594.187 3186.344 3186.177 3186.277
16 0 8 594.237 3187.076 3186.976 3187.076
16 0 9 547.918 3187.176 3186.743 3187.176
24 0 0 905.941 4774.267 4774.837 4773.056
24 0 8 905.995 4776.975 4776.761 4776.832
24 0 9 808.430 4777.118 4777.189 4777.118
32 0 0 1208.741 5838.917 6371.708 6370.852
32 0 8 1199.415 5842.912 6373.895 6373.991
32 0 9 1062.398 5843.232 6374.561 6374.276
64 0 0 2261.671 10782.692 11681.987 12738.854
64 0 8 2262.755 10787.050 10387.399 12747.981
64 0 9 1921.096 10787.187 10388.031 12748.933
300 0 0 7144.508 17294.813 30746.902 41055.087
300 0 8 7146.784 17301.614 18116.458 24348.196
300 0 9 5156.684 14442.439 18205.255 24350.788
1200 0 0 13200.939 17400.127 34204.228 64796.448
1200 0 8 13207.293 17394.391 27862.394 34663.972
1200 0 9 9079.118 15550.266 27354.653 35237.313
4000 0 0 15929.555 17487.329 34897.025 67804.900
4000 0 8 15935.381 17494.350 27885.459 39349.761
4000 0 9 10528.569 15567.579 28001.689 39559.014
8000 0 0 16539.723 17306.809 34986.927 69540.046
8000 0 8 16542.682 17309.263 27077.398 40638.819
8000 0 9 11077.144 15536.126 26990.207 40417.555

Memory libraries

Build

make lib

Install

# Int
cp libmem-int.so /usr/local/lib/
echo '/usr/local/lib/libmem-int.so' > /etc/ld.so.preload

# LSX
sudo cp libmem-lsx.so /usr/local/lib/
echo '/usr/local/lib/libmem-lsx.so' > /etc/ld.so.preload

# LASX
sudo cp libmem-lasx.so /usr/local/lib/
echo '/usr/local/lib/libmem-lasx.so' > /etc/ld.so.preload

About

memory set/cpy/move benchmarks (ls3c5000)

Resources

Stars

Watchers

Forks

Packages

No packages published