This is the mail archive of the
mailing list for the GCC project.
Re: PATCH to TYPE_HASH
Jason Merrill wrote:
Well, then it seems to me that you get to come up with another solution forI've previously objected to the fact that the PCH design does not permit
hashing on pointers.
hashing types across PCH. This strategy is what Geoff suggested.
That's a good way to make things go slower: we need more space in trees
to store these UIDs, and we have to read from memory more often when
doing hashing operations because we have to indirect through a pointer
instead of just reading from it.
It's possible that this is somehow less expensive than whatever would
have to be done to PCH to support it, but I don't see that as being
likely. I do not believe that this tradeoff was benchmarked before
committing to the PCH design. Other PCH mechanisms do not have this
issue, and that other compilers use pointer-hashing extensively.
If you need to make these kinds of changes because we screw things up
horribly otherwise, I don't see we have any choice in the short term.
But, the PCH implementation really should be fixed -- or someone should
explain why it is that the fix is going to be more expensive than an
extra word per _DECL and _TYPE node.