ladybird/Libraries/LibJS/Tests/builtins/Array
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
..
array-as-proxy-target.js LibJS: Skip prototype chain lookup in internal_set() for arrays 2025-05-23 14:51:32 +02:00
array-basic.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
array-index-from-string.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
array-length-setter.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
array-shrink-during-find-crash.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
array-simple-and-generic-storage-initialization.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
array-spread.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.from.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.fromAsync.js LibJS: Close sync iterator when async wrapper yields rejection 2025-04-29 07:33:08 -04:00
Array.isArray.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.of.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype-generic-functions.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.at.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.concat.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.copyWithin.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.entries.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.every.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.fill.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.filter.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.find.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.findIndex.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.findLast.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.findLastIndex.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.flat.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.flatMap.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.forEach.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.includes.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.indexOf.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.join.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.keys.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.lastIndexOf.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.map.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.pop.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.push.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.reduce.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.reduceRight.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.reverse.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.shift.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.slice.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.some.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.sort.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.splice.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.toLocaleString.js LibJS: Ensure tests using the "ar" locale use the "arab" number system 2025-01-18 17:56:40 -05:00
Array.prototype.toReversed.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.toSorted.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.toSpliced.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.toString.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.unshift.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.values.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Array.prototype.with.js Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00