mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 18:19:03 +00:00
LibJS: Don't force property table reification on Shape::property_count()
Previously whenever you would ask a Shape how many properties it had, it would reify the property table into a HashMap and use HashMap::size() to answer the question. This can be a huge waste of time if we don't need the property table for anything else, so this patch implements property count tracking in a separate integer member of Shape. :^)
This commit is contained in:
parent
d01b746d88
commit
b7975abef8
Notes:
sideshowbarker
2024-07-19 02:03:38 +09:00
Author: https://github.com/awesomekling
Commit: b7975abef8
2 changed files with 9 additions and 3 deletions
|
@ -112,6 +112,7 @@ private:
|
|||
bool m_unique { false };
|
||||
Object* m_prototype { nullptr };
|
||||
TransitionType m_transition_type { TransitionType::Invalid };
|
||||
size_t m_property_count { 0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue