This takes up 4 bytes per Symbol. It can be removed with the following change
int Symbol::identity_hash() {
#ifdef _LP64
return int(intx(this)) >> 3;
#else
return int(intx(this)) >> 2;
#endif
}
======================
Dictionary statistics:
======================
eclipse/x86/linux BEFORE AFTER
Number of buckets : 1009 1009
Number of entries : 16411 16413
Average bucket size : 16.265 16.267
Variance of bucket size : 16.857 16.027
Std. dev. of bucket size: 4.106 4.003
Maximum bucket size : 33 29
-------------------------------------------
eclipse/x64/linux BEFORE AFTER
Number of buckets : 1009 1009
Number of entries : 16503 16422
Average bucket size : 16.356 16.276
Variance of bucket size : 15.206 14.661
Std. dev. of bucket size: 3.900 3.829
Maximum bucket size : 31 28
-------------------------------------------
medrec/x64/linux BEFORE AFTER
Number of buckets : 1009 1009
Number of entries : 23185 23055
Average bucket size : 22.978 22.849
Variance of bucket size : 23.187 22.231
Std. dev. of bucket size: 4.815 4.715
Maximum bucket size : 43 44
=========================================
SymbolTable statistics: medrec/x64/linux
=========================================
COUNT TOTAL
BEFORE: 315865 = 15,177,784 bytes, avg 48.051
AFTER: 315872 = 13,927,880 bytes, avg 44.093
SAVING ~= 1,249,904 bytes
There seems to be no degradation in terms of hash-table balance, and we get a good size reduction. So I will file a bug report and do a formal review.
int Symbol::identity_hash() {
#ifdef _LP64
return int(intx(this)) >> 3;
#else
return int(intx(this)) >> 2;
#endif
}
======================
Dictionary statistics:
======================
eclipse/x86/linux BEFORE AFTER
Number of buckets : 1009 1009
Number of entries : 16411 16413
Average bucket size : 16.265 16.267
Variance of bucket size : 16.857 16.027
Std. dev. of bucket size: 4.106 4.003
Maximum bucket size : 33 29
-------------------------------------------
eclipse/x64/linux BEFORE AFTER
Number of buckets : 1009 1009
Number of entries : 16503 16422
Average bucket size : 16.356 16.276
Variance of bucket size : 15.206 14.661
Std. dev. of bucket size: 3.900 3.829
Maximum bucket size : 31 28
-------------------------------------------
medrec/x64/linux BEFORE AFTER
Number of buckets : 1009 1009
Number of entries : 23185 23055
Average bucket size : 22.978 22.849
Variance of bucket size : 23.187 22.231
Std. dev. of bucket size: 4.815 4.715
Maximum bucket size : 43 44
=========================================
SymbolTable statistics: medrec/x64/linux
=========================================
COUNT TOTAL
BEFORE: 315865 = 15,177,784 bytes, avg 48.051
AFTER: 315872 = 13,927,880 bytes, avg 44.093
SAVING ~= 1,249,904 bytes
There seems to be no degradation in terms of hash-table balance, and we get a good size reduction. So I will file a bug report and do a formal review.