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:
Pawel Kozlowski
2019-10-04 12:13:25 +02:00
committed by Alex Rickabaugh
parent affae99b22
commit 9f0c549bc8
4 changed files with 6 additions and 12 deletions

View File

@ -2,9 +2,6 @@
{
"name": "ACTIVE_INDEX"
},
{
"name": "ANIMATION_PROP_PREFIX"
},
{
"name": "BINDING_INDEX"
},

View File

@ -2,9 +2,6 @@
{
"name": "ACTIVE_INDEX"
},
{
"name": "ANIMATION_PROP_PREFIX"
},
{
"name": "BINDING_INDEX"
},