mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-06 22:44:22 +08:00
Summary: public Switch over a String is essentially a switch(string.hashCode()) and it is faster than a HashMap lookup. It also doesn't use extra memory, and doesn't require static initialization (startup penalty). Plus I believe this way the generated code looks more readable. Reviewed By: lexs Differential Revision: D2818223 fb-gh-sync-id: d9100ec0f8ad556c347681cbe1433d066076d3e5