Comparison of V8 and javascriptcore on Android froyo

Source: Internet
Author: User

 

Since Android 2.2, Google released their V8: A JavaScript engine used to replace javascriptcore. It claims that its execution speed can match the compiled executable speed.Code.

 

How fast is the built-in javascriptcore of WebKit? Recently, we used two engines in the froyo version of Android to run sunspider for comparative testing. The results are shown in. The data result of each row indicates the time required to execute the item, in milliseconds. The smaller the value, the better the performance. The last column indicates how many times the running speed of V8 is of javascriptcore, and the gray data indicates a decrease, the default value is upgrade.

 

Conclusion:

    1. From the data point of view, there is indeed a small improvement, with an average increase of at least 3-4 times.
    2. But for end users, is the Web browsing experience improved several times as Google said? In most cases, it is "no", because the browser experience of mobile phones is limited by the network bandwidth speed first, and the proportion of JavaScript scripts in different webpages is also different. For common news webpages, the JS speed is 100 times faster and users may not be able to perceive it. However, for Gmail, Google map, or even web game websites that use a large number of JavaScript pages, it may bring significant improvements.
    3. Where it is "invisible", we suspect that V8 will use more memory, because the test is often executed completely on phones with low memory. Further verification is required.

 

Others:

    1. About sunspider: One of the commonly used tools to test the browser's JavaScript performance, see http://www2.webkit.org/perf/sunspider/sunspider.html
    2. About javascriptcore: It was first originated from KDE's KJS, and then evolved into javascriptcore in Apple's WebKit project. After several improvements by Apple and squirrelfish extreme versions, currently, SFX is used on safari and most Android devices, that is, the latter.
    3. V8 was previously used by Google on Google Chrome. It converts the script to the machine code for execution, rather than the bytecode like javascriptcore ).
    4. About the hardware used to test the mobile phone: the CPU is 624 m in the M family, armv5te, and the memory is 512 M. The OS is froyo/2.3. To run V8 on armv5te, you need to remove the vfp3 command in the compilation phase; otherwise, sigill will occur during the runtime.
    5. The official logo of the V8 project is displayed on the left in froyo.Source codeThe logo used in is like right (too simple ...).

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.