[libc-dev] Q&A and the round table highlights from the virtual dev meeting
Guillaume Chatelet via libc-dev
libc-dev at lists.llvm.org
Mon Oct 19 01:19:13 PDT 2020
On Fri, Oct 9, 2020 at 2:29 AM Siva Chandra <sivachandra at google.com> wrote:
> +cc gchatelet for #3 under Q&A
> 3. What codebase did you analyze for your statistics on uses of memcpy,
> A. As far as I know, it was done over Google internal code bases. I
> copied this mail to Guillaume who did this actual work. So, he might
> be able to throw more light on this.
We have gathered statistics for several important binaries at Google
(servers, databases, realtime and batch jobs). We are sharing the observed
probability distributions inside llvm-libc and plan to provide a way to
"score" the implementations with these distributions.
We currently offer 9 different profiles for `memcpy` and `memcmp` (4 for
`memset`). We may add more of them if we feel they are representative
The key takeaway here is that most sizes are small as described in  and
so it is important to optimize for them. To be clear it does not mean that
we don't care about larger sizes (large copies *must* be efficient as well)
but overall it's on the small sizes that we are likely to gain.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the libc-dev