mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 21:47:46 +00:00
LibJS: Get rid of unnecessary work from canonical_numeric_index_string
The spec version of canonical_numeric_index_string is absurdly complex, and ends up converting from a string to a number, and then back again which is both slow and also requires a few allocations and a string compare. Instead lets use the logic we already have as that is much more efficient. This improves performance of all non-numeric property names.
This commit is contained in:
parent
44a2ebea00
commit
3a184f7841
8 changed files with 57 additions and 98 deletions
|
@ -16,7 +16,7 @@
|
|||
|
||||
namespace Web::Bindings::IDL {
|
||||
|
||||
bool is_an_array_index(JS::GlobalObject&, JS::PropertyKey const&);
|
||||
bool is_an_array_index(JS::PropertyKey const&);
|
||||
Optional<ByteBuffer> get_buffer_source_copy(JS::Object const& buffer_source);
|
||||
|
||||
// https://webidl.spec.whatwg.org/#call-user-object-operation-return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue