mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
AK: Let FlyString::hash() assume that the string was already hashed
Since the FlyString deduplication mechanism uses a HashTable, we know that any StringImpl inside a non-null FlyString will already have its lazily computed hash.
This commit is contained in:
parent
d1ffdea550
commit
02e0fab19a
Notes:
sideshowbarker
2024-07-19 07:38:05 +09:00
Author: https://github.com/awesomekling
Commit: 02e0fab19a
2 changed files with 7 additions and 2 deletions
|
@ -71,6 +71,11 @@ public:
|
|||
return m_hash;
|
||||
}
|
||||
|
||||
unsigned existing_hash() const
|
||||
{
|
||||
return m_hash;
|
||||
}
|
||||
|
||||
bool is_fly() const { return m_fly; }
|
||||
void set_fly(Badge<FlyString>, bool fly) const { m_fly = fly; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue