mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 03:29:49 +00:00
LibJS: Add cache for the string "[object Object]"
This is very frequently returned by Object.prototype.toString(), so we benefit from caching it instead of recreating it every time. Takes Speedometer2.1/EmberJS-Debug-TodoMVC from ~4000ms to ~3700ms on my M3 MacBook Pro.
This commit is contained in:
parent
e8c351505e
commit
81d4ed27d8
Notes:
github-actions[bot]
2025-04-15 11:09:47 +00:00
Author: https://github.com/awesomekling
Commit: 81d4ed27d8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4359
4 changed files with 27 additions and 20 deletions
|
@ -229,7 +229,8 @@ public:
|
|||
GC::Ptr<PrimitiveString> boolean;
|
||||
GC::Ptr<PrimitiveString> bigint;
|
||||
GC::Ptr<PrimitiveString> function;
|
||||
} typeof_strings;
|
||||
GC::Ptr<PrimitiveString> object_Object;
|
||||
} cached_strings;
|
||||
|
||||
void run_queued_promise_jobs();
|
||||
void enqueue_promise_job(GC::Ref<GC::Function<ThrowCompletionOr<Value>()>> job, Realm*);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue