By: Matt Sayler (sayler.delete@this.thewalrus.org), February 24, 2021 7:10 pm
Room: Moderated Discussions
Wilco (wilco.dijkstra.delete@this.ntlworld.com) on February 24, 2021 11:37 am wrote:
> You don't need to write memcpy from scratch for every new CPU. GLIBC has a lot of code
> devoted to selecting the best memcpy for each CPU - users don't need to do anything.
>
> However if you want to use rep movsb, you do need to understand all the details and gotchas.
> Just try reading the GLIBC code - GLIBC only considers rep movsb on CPUs with ERMS,
> but there are 8 separate runtime checks before it decides to actually use it.
I don't have a horse in this race, but I'm curious: does the runtime selection work well for heterogeneous core chips?
> You don't need to write memcpy from scratch for every new CPU. GLIBC has a lot of code
> devoted to selecting the best memcpy for each CPU - users don't need to do anything.
>
> However if you want to use rep movsb, you do need to understand all the details and gotchas.
> Just try reading the GLIBC code - GLIBC only considers rep movsb on CPUs with ERMS,
> but there are 8 separate runtime checks before it decides to actually use it.
I don't have a horse in this race, but I'm curious: does the runtime selection work well for heterogeneous core chips?