diff options
author | Anonymous <anon@mous.org> | 2022-02-12 12:51:06 -0800 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-13 14:44:36 +0100 |
commit | 3a184f784186ad1c5a9704b05ab0902d577d5748 (patch) | |
tree | eeded57e00af7aeb0275468cd57f586be264155c /Userland/Libraries/LibJS/Runtime/PrimitiveString.cpp | |
parent | 44a2ebea00a15f12eb01cac8c822dc5de2614056 (diff) | |
download | serenity-3a184f784186ad1c5a9704b05ab0902d577d5748.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/PrimitiveString.cpp')
0 files changed, 0 insertions, 0 deletions