LibJS+LibWeb: Inline fast path for Value::to_object()

Adds inline implementation for the most common case when `Value` is
already an object.

1.47x improvement on the following benchmark:
```js
const o = {};
for (let i = 0; i < 10_000_000; i++) {
    o.a = 1;
    o.b = 2;
    o.c = 3;
}
```
This commit is contained in:
Aliaksandr Kalenik 2025-09-13 20:50:09 +02:00 committed by Alexander Kalenik
commit 85e029b2e7
Notes: github-actions[bot] 2025-09-15 10:18:00 +00:00
16 changed files with 22 additions and 1 deletions

View file

@ -28,6 +28,7 @@
#include <LibJS/Runtime/PromiseCapability.h>
#include <LibJS/Runtime/PromiseConstructor.h>
#include <LibJS/Runtime/Value.h>
#include <LibJS/Runtime/ValueInlines.h>
namespace JS {