1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00
ladybird/Libraries/LibWeb/WebIDL
Aliaksandr Kalenik bd6750aaa5 LibJS: Skip prototype chain lookup in internal_set() for arrays
...when Array.prototype and Object.prototype are intact.

If `internal_set()` is called on an array exotic object with a numeric
PropertyKey, and:
- the prototype chain has not been modified (i.e., there are no getters
  or setters for indexed properties), and
- the array is not the target of a Proxy object,

then we can directly store the value in the receiver's indexed
properties, without checking whether it already exists somewhere in the
prototype chain.

1.7x improvement on the following program:
```js
function f() {
    let a = [];
    let i = 0;
    while (i < 10_000_000) {
        a.push(i);
        i++;
    }
}

f();
```
2025-05-23 14:51:32 +02:00
..
AbstractOperations.cpp LibWeb: Implement caching of reflected element array attributes 2025-04-26 17:29:38 -04:00
AbstractOperations.h LibWeb: Implement caching of reflected element array attributes 2025-04-26 17:29:38 -04:00
AsyncIterator.cpp LibIDL+LibWeb: Begin support for async iterator in IDL 2025-04-14 17:43:11 -04:00
AsyncIterator.h LibIDL+LibWeb: Begin support for async iterator in IDL 2025-04-14 17:43:11 -04:00
Buffers.cpp LibWeb/IDB: Update convert_a_value_to_a_key to latest changes 2025-03-13 11:23:15 +01:00
Buffers.h LibWeb/IDB: Update convert_a_value_to_a_key to latest changes 2025-03-13 11:23:15 +01:00
CallbackType.cpp LibWeb: Move ad hoc CallbackType helper method to CallbackType header 2024-12-11 15:11:21 +01:00
CallbackType.h LibWeb: Move ad hoc CallbackType helper method to CallbackType header 2024-12-11 15:11:21 +01:00
DOMException.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
DOMException.h LibWeb: Add formatters for WebIDL exception types 2025-01-23 21:39:02 +01:00
DOMException.idl
ExceptionOr.h LibJS: Make Completion.[[Value]] non-optional 2025-04-05 11:20:26 +02:00
Function.idl
ObservableArray.cpp LibJS: Skip prototype chain lookup in internal_set() for arrays 2025-05-23 14:51:32 +02:00
ObservableArray.h LibJS: Skip prototype chain lookup in internal_set() for arrays 2025-05-23 14:51:32 +02:00
OverloadResolution.cpp LibJS: Use FlyString in PropertyKey instead of DeprecatedFlyString 2025-03-24 22:27:17 +00:00
OverloadResolution.h
Promise.cpp LibWeb: Implement ReadableStreamPipeTo according to spec 2025-04-11 12:10:46 -04:00
Promise.h LibWeb: Implement ReadableStreamPipeTo according to spec 2025-04-11 12:10:46 -04:00
Tracing.cpp
Tracing.h
Types.h LibWeb: Redefine WebIDL types in terms of Infra spec 2024-12-05 17:34:13 +01:00