mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 01:24:33 +02:00
8240124
: Better VM Interning
Reviewed-by: rehn, pliden, smarks, rhalade, ahgross, jwilhelm
This commit is contained in:
parent
fa25d083be
commit
a5cb23e29f
8 changed files with 365 additions and 286 deletions
|
@ -91,11 +91,11 @@ static size_t _current_size = 0;
|
|||
static volatile size_t _items_count = 0;
|
||||
|
||||
volatile bool _alt_hash = false;
|
||||
static juint murmur_seed = 0;
|
||||
static uint64_t _alt_hash_seed = 0;
|
||||
|
||||
uintx hash_string(const jchar* s, int len, bool useAlt) {
|
||||
return useAlt ?
|
||||
AltHashing::murmur3_32(murmur_seed, s, len) :
|
||||
AltHashing::halfsiphash_64(_alt_hash_seed, s, len) :
|
||||
java_lang_String::hash_code(s, len);
|
||||
}
|
||||
|
||||
|
@ -523,7 +523,7 @@ void StringTable::rehash_table() {
|
|||
return;
|
||||
}
|
||||
|
||||
murmur_seed = AltHashing::compute_seed();
|
||||
_alt_hash_seed = AltHashing::compute_seed();
|
||||
{
|
||||
if (do_rehash()) {
|
||||
rehashed = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue