You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that in much of my code, Data.key is often near the top of CPU time for initialization when hundreds or thousands of elements have their data initialized (as is sometimes the case using ngAnimate in Angular).
By feature detecting the presence of Symbol and using it rather than a non-enumerable property, this function went from like 70-100ms CPU time to 0.3 since not only does it not have the overhead of define property, but we can avoid the try/catch in that codepath as well.