{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/14231","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/14231/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/14231/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/14231/events","html_url":"https://github.com/facebook/react-native/pull/14231","id":231832196,"number":14231,"title":"replace Float.compare(value, UNDEFINED) == 0 with Float.isNaN to impr…","user":{"login":"ransj","id":1728477,"avatar_url":"https://avatars1.githubusercontent.com/u/1728477?v=3","gravatar_id":"","url":"https://api.github.com/users/ransj","html_url":"https://github.com/ransj","followers_url":"https://api.github.com/users/ransj/followers","following_url":"https://api.github.com/users/ransj/following{/other_user}","gists_url":"https://api.github.com/users/ransj/gists{/gist_id}","starred_url":"https://api.github.com/users/ransj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ransj/subscriptions","organizations_url":"https://api.github.com/users/ransj/orgs","repos_url":"https://api.github.com/users/ransj/repos","events_url":"https://api.github.com/users/ransj/events{/privacy}","received_events_url":"https://api.github.com/users/ransj/received_events","type":"User","site_admin":false},"labels":[{"id":260305031,"url":"https://api.github.com/repos/facebook/react-native/labels/Android","name":"Android","color":"bfe5bf","default":false},{"id":196858975,"url":"https://api.github.com/repos/facebook/react-native/labels/CLA%20Signed","name":"CLA Signed","color":"e7e7e7","default":false},{"id":172176599,"url":"https://api.github.com/repos/facebook/react-native/labels/GH%20Review:%20review-needed","name":"GH Review: review-needed","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-05-27T22:30:58Z","updated_at":"2017-05-31T08:45:58Z","closed_at":"2017-05-30T09:56:59Z","pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/14231","html_url":"https://github.com/facebook/react-native/pull/14231","diff_url":"https://github.com/facebook/react-native/pull/14231.diff","patch_url":"https://github.com/facebook/react-native/pull/14231.patch"},"body":"Float computations are costly on mobile platform. The replacement of \"Float.compare(value, UNDEFINED) == 0\" can help improve performance.\r\n\r\nTest case are like this:\r\n    public static void main(String[] args) {\r\n        // wait 5s for cpu idle\r\n        for (long start = System.currentTimeMillis(); start + 5000 >= System.currentTimeMillis(); ) {\r\n            Thread.yield();\r\n        }\r\n        int count = 10000;\r\n        long start = System.currentTimeMillis();\r\n        for (int i = 0; i < count; i++) {\r\n            Float.isNaN(Float.NaN);\r\n            Float.isNaN(100f);\r\n        }\r\n        System.out.println(\" Float.isNaN cost \" + (System.currentTimeMillis() - start));\r\n        start = System.currentTimeMillis();\r\n        for (int i = 0; i < count; i++) {\r\n            Float.compare(Float.NaN, Float.NaN);\r\n            Float.compare(Float.NaN, 100f);\r\n        }\r\n        System.out.println(\" Float.Float.compare cost \" + (System.currentTimeMillis() - start));\r\n    }"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/305126120","html_url":"https://github.com/facebook/react-native/pull/14231#issuecomment-305126120","issue_url":"https://api.github.com/repos/facebook/react-native/issues/14231","id":305126120,"user":{"login":"ransj","id":1728477,"avatar_url":"https://avatars1.githubusercontent.com/u/1728477?v=3","gravatar_id":"","url":"https://api.github.com/users/ransj","html_url":"https://github.com/ransj","followers_url":"https://api.github.com/users/ransj/followers","following_url":"https://api.github.com/users/ransj/following{/other_user}","gists_url":"https://api.github.com/users/ransj/gists{/gist_id}","starred_url":"https://api.github.com/users/ransj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ransj/subscriptions","organizations_url":"https://api.github.com/users/ransj/orgs","repos_url":"https://api.github.com/users/ransj/repos","events_url":"https://api.github.com/users/ransj/events{/privacy}","received_events_url":"https://api.github.com/users/ransj/received_events","type":"User","site_admin":false},"created_at":"2017-05-31T08:45:58Z","updated_at":"2017-05-31T08:45:58Z","body":"@javache is it means that the commit to https://github.com/facebook/yoga will finally affect RN project? "}}
{"actor":{"display_login":"ransj"}}