wip patch: Create SymbolBody for all symbols
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 10 12:35:32 PST 2016
On 10 March 2016 at 15:27, Rui Ueyama <ruiu at google.com> wrote:
> By the way, I was wondering if the locality (or the lack of thereof) of
> SymbolBody and Symbol would matter, so I tried to embed Symbol to
> SymbolBody, so that they are close in memory (probably on the same cache
> line). In many cases there is one-to-one correspondence between SymbolBody
> and Symbol, so backref pointer is rarely updated. That change however made
> the program slower. I don't understand why, though.
So, I don't remember there being more cache misses. I just thing the
issue is the chain of loads, which is why once this is done I think we
should experimenting with making SymbolBody a sum type so that it can
be allocated in place. Instead of
std::vector<SymbolBody *> SymbolBodies;
We would have
std::vector<SymbolBody> SymbolBodies;
Cheers,
Rafael
More information about the llvm-commits
mailing list