By: Wilco (wilco.dijkstra.delete@this.ntlworld.com), February 23, 2021 4:48 am
Room: Moderated Discussions
Anon (no.delete@this.spam.com) on February 23, 2021 3:05 am wrote:
> anon2 (anon.delete@this.anon.com) on February 22, 2021 7:17 pm wrote:
> > I don't think memcpy, memset instructions are bad per se, though I still don't understand
> > the fascination with them, unless their proponents are going to move on to do-daxpy, route-ip-packet,
> > gzip-memory, etc instructions when/if one day Intel's rep ; mov finally doesn't suck. But
> > I digress, the point was not a totally open-ended "ISA does not matter".
>
> memcpy is quite common, easy to implement in hardware and very inefficient to implement in software.
You forgot the sarcasm tag :-)
bench-memcpy-random in GLIBC shows just how "efficient" rep movsb (__memcpy_erms) is on my 3700X:
Wilco
> anon2 (anon.delete@this.anon.com) on February 22, 2021 7:17 pm wrote:
> > I don't think memcpy, memset instructions are bad per se, though I still don't understand
> > the fascination with them, unless their proponents are going to move on to do-daxpy, route-ip-packet,
> > gzip-memory, etc instructions when/if one day Intel's rep ; mov finally doesn't suck. But
> > I digress, the point was not a totally open-ended "ISA does not matter".
>
> memcpy is quite common, easy to implement in hardware and very inefficient to implement in software.
You forgot the sarcasm tag :-)
bench-memcpy-random in GLIBC shows just how "efficient" rep movsb (__memcpy_erms) is on my 3700X:
"timing_type": "hp_timing",
"functions": {
"memcpy": {
"bench-variant": "random",
"ifuncs": ["__memcpy_avx_unaligned", "__memcpy_avx_unaligned_erms", "__memcpy_ssse3_back", "__memcpy_ssse3", "__memcpy_sse2_unaligned", "__memcpy_sse2_unaligned_erms", "__memcpy_erms"],
"results": [
{
"max-size": 4096,
"timings": [201553, 200959, 272047, 251099, 164108, 165561, 428758]
},
{
"max-size": 8192,
"timings": [199125, 198071, 263701, 247578, 159813, 159340, 421392]
},
{
"max-size": 16384,
"timings": [199538, 196131, 267008, 250593, 161848, 163724, 421873]
},
{
"max-size": 32768,
"timings": [203553, 194081, 268296, 253730, 169461, 170411, 419616]
},
{
"max-size": 65536,
"timings": [204701, 200065, 267463, 255599, 163664, 167617, 424114]
},
{
"max-size": 131072,
"timings": [199415, 205714, 272646, 255835, 165658, 172426, 425134]
},
{
"max-size": 262144,
"timings": [197246, 203843, 269340, 265621, 159263, 161571, 449099]
},
{
"max-size": 524288,
"timings": [205213, 211435, 277131, 285266, 170522, 170597, 612529]
}]
}
}
Wilco