mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibJS+LibWeb: Return Vector<PropertyKey> from internal_own_property_keys
By doing that we avoid lots of `PropertyKey` -> `Value` -> `PropertyKey` transforms, which are quite expensive because of underlying `FlyString` -> `PrimitiveString` -> `FlyString` conversions. 10% improvement on MicroBench/object-keys.js
This commit is contained in:
committed by
Alexander Kalenik
parent
47569c1714
commit
5ee810f772
Notes:
github-actions[bot]
2025-05-15 18:13:23 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/5ee810f7721 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4733
@@ -29,7 +29,7 @@ protected:
|
||||
private:
|
||||
virtual ThrowCompletionOr<Optional<PropertyDescriptor>> internal_get_own_property(PropertyKey const&) const override;
|
||||
virtual ThrowCompletionOr<bool> internal_define_own_property(PropertyKey const&, PropertyDescriptor const&, Optional<PropertyDescriptor>* precomputed_get_own_property = nullptr) override;
|
||||
virtual ThrowCompletionOr<GC::RootVector<Value>> internal_own_property_keys() const override;
|
||||
virtual ThrowCompletionOr<Vector<PropertyKey>> internal_own_property_keys() const override;
|
||||
|
||||
virtual bool is_string_object() const final { return true; }
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
Reference in New Issue
Block a user