LibJS: Replace some use of ByteString with String

1.19x speedup on MicroBench/for-in-indexed-properties.js
This commit is contained in:
Andreas Kling 2025-05-02 14:16:21 +02:00 committed by Andreas Kling
parent 2ef2e75cdc
commit 0ef6444824
Notes: github-actions[bot] 2025-05-03 06:08:59 +00:00
3 changed files with 29 additions and 29 deletions

View file

@ -1095,7 +1095,7 @@ ThrowCompletionOr<GC::RootVector<Value>> Object::internal_own_property_keys() co
// 2. For each own property key P of O such that P is an array index, in ascending numeric index order, do
for (auto& entry : m_indexed_properties) {
// a. Add P as the last element of keys.
keys.append(PrimitiveString::create(vm, ByteString::number(entry.index())));
keys.append(PrimitiveString::create(vm, String::number(entry.index())));
}
// 3. For each own property key P of O such that Type(P) is String and P is not an array index, in ascending chronological order of property creation, do