mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
AK: Reduce HashTable's load factor to 70%
Measurements on my device have shown HashTable lookups and inserts to be faster up to ~20%, at the cost of 10-20% more memory usage depending on the exact amount of buckets.
This commit is contained in:
committed by
Andreas Kling
parent
1745926fc6
commit
2522aad8b7
Notes:
github-actions[bot]
2026-02-20 21:48:44 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/2522aad8b70 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8048
@@ -120,7 +120,7 @@ private:
|
||||
template<typename T, typename TraitsForT, bool IsOrdered>
|
||||
class HashTable {
|
||||
static constexpr size_t grow_capacity_at_least = 8;
|
||||
static constexpr size_t grow_at_load_factor_percent = 80;
|
||||
static constexpr size_t grow_at_load_factor_percent = 70;
|
||||
static constexpr size_t grow_capacity_increase_percent = 60;
|
||||
|
||||
struct StoredHash {
|
||||
|
||||
Reference in New Issue
Block a user