admin管理员组文章数量:1356908
What JS 'engine' does Cordova use? Is it platform specific or is it one standard across all platforms? Meaning safari for iOS and chrome for Android, and possible IE standards for windows? Or a 'Cordova JS' engine across all platforms.
More specifically i read that it depends on the browser JS implementation for what sorting algorithm .sort() uses (Mozilla uses merge-sort). And i was considering using a merge-sort function i created or the standard .sort() function. (which could be a merge-sort anyway). The built in .sort() seems to be about 10ms quicker, or about 14% quicker.
Only reason I would want to use my merge-sort (slower) is because I know for sure it will be implemented exactly the same across iOS, windows, android, etc...
What JS 'engine' does Cordova use? Is it platform specific or is it one standard across all platforms? Meaning safari for iOS and chrome for Android, and possible IE standards for windows? Or a 'Cordova JS' engine across all platforms.
More specifically i read that it depends on the browser JS implementation for what sorting algorithm .sort() uses (Mozilla uses merge-sort). And i was considering using a merge-sort function i created or the standard .sort() function. (which could be a merge-sort anyway). The built in .sort() seems to be about 10ms quicker, or about 14% quicker.
Only reason I would want to use my merge-sort (slower) is because I know for sure it will be implemented exactly the same across iOS, windows, android, etc...
Share Improve this question asked Feb 26, 2016 at 22:35 slowswordslowsword 3142 silver badges15 bronze badges 3-
Uhhh, when would it matter if a JS engine on one platform happened to use a different algorithm for
.sort()
? The end result should be the same, right? – jfriend00 Commented Feb 26, 2016 at 22:38 - your probably right, but it was more of a thought question really – slowsword Commented Feb 26, 2016 at 22:39
- add plugin crosswalk webview so program just use one platform and make app faster – Cagri Tacyildiz Commented Feb 26, 2016 at 22:39
2 Answers
Reset to default 8On Android it uses Android WebView which is based on Chromium, and uses the V8 JavaScript engine.
On iOS, as of iOS8 it uses the WKWebView which is based on Safari and uses the Nitro JavaScript engine.
On other platforms... well, whatever the native web view is.
Cordova is, at the end of the day, a native app with a web view embedded inside, and it uses the web browser ponent specific to the platform where the app is deployed.
If you wish to use another Web browser ponent is still possible. Take a look at Crosswalk.
本文标签: javascriptWhat js 39engine39 does cordova useStack Overflow
版权声明:本文标题:javascript - What js 'engine' does cordova use? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744036813a2579925.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论