LibJS: Make GetById and GetByValue avoid get_identifier() in common case

We now defer looking up the various identifiers by IdentifierTableIndex
until the last moment. This allows us to avoid the retrieval in common
cases like when a property access is cached.

Knocks a ~12% item off the profile on https://ventrella.com/Clusters/
This commit is contained in:
Andreas Kling 2024-07-09 11:37:06 +02:00 committed by Andreas Kling
commit 509c10d14d
Notes: sideshowbarker 2024-07-17 01:27:18 +09:00
4 changed files with 57 additions and 22 deletions

View file

@ -402,6 +402,8 @@ private:
bool m_must_propagate_completion { true };
GCPtr<ECMAScriptFunctionObject const> m_function;
Optional<IdentifierTableIndex> m_length_identifier;
};
}