[PATCH 3/3] Record template specialization hash
Jason Merrill
jason@redhat.com
Fri Oct 4 01:43:00 GMT 2024
On 10/2/24 7:53 AM, Richard Biener wrote:
> For a specific testcase a lot of compile-time is spent in re-hashing
> hashtable elements upon expansion. The following records the hash
> in the hash element. This speeds up compilation by 20%.
>
> There's probably module-related uses that need to be adjusted.
>
> Bootstrap failed (guess I was expecting this), but still I think this
> is a good idea - maybe somebody can pick it up.
Applying the attached, thanks!
> Possibly instead of having a single global hash table having one per ID would be
> better.
That sounds excessive to me. Is the actual hashtable lookup significant
in the profile?
> The hashtable also keeps things GC-live ('args' for example).
Those args should also be referenced by TI_ARGS from the respective
template specialization.
Jason
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-c-record-template-specialization-hash.patch
Type: text/x-patch
Size: 7408 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20241003/ff76d329/attachment-0001.bin>
More information about the Gcc-patches
mailing list