[PATCH] [clang] Optimized ASTNodeKind::isBaseOf

Alexander Kornienko alexfh at google.com
Thu Oct 2 22:33:21 PDT 2014


On 3 Oct 2014 09:05, "Manuel Klimek" <klimek at google.com> wrote:
>
>
> On Thu, Oct 2, 2014, 19:37 Alexander Kornienko <alexfh at google.com> wrote:
>>
>> One important thing this patch does, it splits isBaseOf with and without
distance to avoid runtime selection.
>>
>> As for the caching, I believe it doesn't matter much, as on my test
(lib/Sema/SemaOverload.cpp) most of the calls were asking one of a small
number of table cells. Here's some data:
>>
>>   * total calls: ~39M
>>   * total number of pairs asked: 1646
>>   * 103 mostly asked cells cover 80% of all calls
>>   * 219 mostly asked cells cover 90% of all calls
>>   * 50 mostly asked rows (< 6kB) cover 97% of all calls
>
> if they're spread out you might still hit 50 different pages...

You mean cache lines?

>>
>> The other solutions you've proposed are also interesting (especially #4
which is the most elegant, but requires some care in arranging the primes),
but this one is the most straightforward, IMO.
>>
>> http://reviews.llvm.org/D5577
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141003/319e433d/attachment.html>


More information about the cfe-commits mailing list