This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: changing a collision resolution strategy of the symbol table of identifiers


2013/10/20 OndÅej BÃlka <neleai@seznam.cz>:
> On Sun, Oct 20, 2013 at 06:55:40PM +0600, Roman Gareev wrote:
>> Dear gcc contributors,
>>
>> Recently I came across the list of "ideas for speeding up GCC"
>> (http://gcc.gnu.org/wiki/Speedup_areas). Among others, there was
>> suggested to replace identifier hash table with other data structure.
>>
>> Please find attached a patch, that switches the resolution strategy of
>> a hash table used in the symbol table of identifiers from open
>> addressing to separate chaining with linked list. I would be very
>> grateful for your comments, feedback and ideas about further
>> enhancements to gcc, in which I could take a part. I am pursuing
>> master of science and looking for thesis theme, that is compiler
>> related.
>>
>> Below are results of testing and the patch.
>>
>> During testing of the linux kernel (3.8.8) compilation time, the
>> acquired results were the following: increasing by 0.17% for the
>> version 4.8.0, increasing by 1.12% for the version 4.8.1, decreasing
>> by 0.598% for trunk (this are average values).
>>
>>
>> Tested x86_64-unknown-linux-gnu, applying to 4.8.0, 4.8.1 and trunk.
>>
>>
>> diff --git a/gcc/stringpool.c b/gcc/stringpool.c
>>
>> index f4d0dae..cc696f7 100644
>>
>> --- a/gcc/stringpool.c
>>
>> +++ b/gcc/stringpool.c
>>
>> @@ -241,12 +241,8 @@ gt_pch_nx (unsigned char *x, gt_pointer_operator
>> op, void *cookie)
>>
>> /* SPD is saved in the PCH file and holds the information needed
>>
>> to restore the string pool. */
>>
>> -struct GTY(()) string_pool_data {
>>
>> - ht_identifier_ptr *
>>
>> - GTY((length ("%h.nslots"),
>>
> Mail client broke it?
Sorry, an error occurred somewhere. Below is an attachment with the patch.

Attachment: patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]