[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,
> etc.?
> 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[1] 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
enough.

The key takeaway here is that most sizes are small as described in [2] 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.

Thanks,
Guillaume Chatelet

1. https://reviews.llvm.org/D89401
2.
https://github.com/llvm/llvm-project/tree/master/libc/benchmarks#benchmarking-regimes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libc-dev/attachments/20201019/a5e34f08/attachment.html>


More information about the libc-dev mailing list