perf(ivy): avoid memory allocation in the isAnimationProp check (#32997)
Accessing a string's character at index allocates a new, single character string. A better (faster) check is to use `charCodeAt` that doesn't trigger allocation. This simple change speeds up the element_text_create benchmark by ~7%. PR Close #32997
This commit is contained in:

committed by
Alex Rickabaugh

parent
affae99b22
commit
9f0c549bc8
@ -2,9 +2,6 @@
|
||||
{
|
||||
"name": "ACTIVE_INDEX"
|
||||
},
|
||||
{
|
||||
"name": "ANIMATION_PROP_PREFIX"
|
||||
},
|
||||
{
|
||||
"name": "BINDING_INDEX"
|
||||
},
|
||||
|
@ -2,9 +2,6 @@
|
||||
{
|
||||
"name": "ACTIVE_INDEX"
|
||||
},
|
||||
{
|
||||
"name": "ANIMATION_PROP_PREFIX"
|
||||
},
|
||||
{
|
||||
"name": "BINDING_INDEX"
|
||||
},
|
||||
|
Reference in New Issue
Block a user