Android on X86: Can you have both performance and compatibility?
Android on X86: Can you have both performance and compatibility?

Editor's note: Since Intel released the Medfield platform for the mobile market on CES2012, there have been some Android phones based on X86 on the market. They can even achieve single core war, dual core war and four core war in some tests. Is the actual application of the X86 mobile phone really so ideal?

The author is Love to play computer games Special author and technical expert "Gun God"

 

Most Android applications are developed based on Dalvik Java code. In theory, since Dalvik code is executed in the system's virtual machine, there will be no performance loss on the x86 ATOM platform. However, due to the limited execution efficiency of virtual machines, Google allows developers to use native C language code for some high-performance applications. The native code is compiled for the hardware platform, and x86, ARM or MIPS have their corresponding binary files. Generally speaking, x86 processors cannot run directly against binary code compiled on the ARM platform. The mainstream Android products all use ARM processors. Although Google's Android NDK introduced the x86 compilation option long ago, a considerable number of applications have been compiled only for the ARM platform, which has caused the compatibility problem of the x86 Android platform.

To solve this problem, Intel introduced the function of "Binary Translation" when it launched the ATOM platform of Android mobile phone system, to solve the problem that x86 cannot directly run the ARM library. Binary code compiled for ARM will be translated into x86 code by ATOM processor, so as to run applications containing native code compiled for ARM.

 

Through this function, x86 ATOM can be compatible with most applications on the market. The latest Lenovo K900, which uses the Atom Z2580 processor, has announced that it can be compatible with the top 20000 applications in the market.

After the compatibility problem is solved, plus the powerful performance of the x86 Atom single nuclear war dual core, dual core second quad core (running points), x86 seems to have no black spots, and the market is just around the corner. But unfortunately, x86 The advertised "compatibility" and "performance" cannot have both because of the current ecological environment constraints.

 

First, let's take a brief look at the current ecosystem of x86 on Android:

Although the top 20000 applications are already compatible, I have counted the 250 most popular applications in the pea pod market, 31% of which do not use native code. Of the remaining 69% of applications that contain native code, only 8% contain x86 libraries, and the remaining 61% contain only ARM native libraries. In other words, only 8% of the applications can give full play to x86's best performance, and most of them need binary conversion for compatibility.

 

Furthermore, native code is more widely used in game applications with high performance requirements.

According to the statistics of the top 100 most popular games on Dangle, we found that only 6% of the games do not contain native libraries, which is better than 94% of the games contain native code. Among them, only 5% of games contain x86 native libraries, and nearly 90% of the remaining games require Atom processors to run ARM compiled code through binary conversion.

 

Of course, out of the need for high performance, many games include the runtime of armv7a. However, my Lenovo K800 (Atom Z2460) phone can also be executed through binary conversion. However, after testing, the native library containing Neon SIMD code cannot be executed.

Having said that, we understand that a considerable number of applications need x86 to be compatible with ARM code through binary conversion. So, x86 The performance is so strong that ARM can be implemented in a compatible way Code, how does it behave? This is a long term And a problem that manufacturers avoid.

 

This test object: Lenovo K800 mobile phone, which is the first x86 mobile phone listed in China. The processor is Atom Z2460 1.6GHz, with single core and double threads, PowerVR SGX540 400MHz GPU。

 

First of all, we know that Anthare is one of x86's favorite runners.

Although the Z2460 has only a single core, its score still exceeds that of most low frequency dual core ARM A9, which is no inferior to the high frequency dual core A9/Krait. The Z2580, which uses dual core and four threads, can hit 30000 points, pointing to the current high-end 4+4 core processor.

 

However, after using the ARMv7 library, the performance of the Z2460 is not optimistic. The total score has suddenly shrunk by two thirds, and the CPU score is almost the same as that of the single core A8

 

The following series of tests also show the same situation: when using the x86 native library, we can find that ATOM's single thread performance is exceptionally strong, especially the memory performance

Once the compatibility mode is adopted and the ARM library is run through binary conversion, the performance will be greatly reduced. The 1.6GHz Atom can not even reach the level of 1GHz Cortex-A7.

 

CoreMark is in the same situation, and the performance loss is considerable

 

As the price of compatibility, the performance loss is only one aspect. On the other hand, the power consumption increases. As shown in the first half of this article, few popular games currently have x86 native libraries. To facilitate comparative testing, we selected Epic Citadel Applications are representative of games.

Epic Citadel is a demo based on the illusion engine. The picture is very beautiful, and the light and shadow effects are also good

 

In this test, we use Intel GPA System Analyzer to record the CPU utilization and the working current of the mobile phone

 

Use the Benchmark scenario provided by Epic Citadel to test, and the results are as follows

The average score of 45.9 FPS is achieved by using x86 native library (I), while the score of compatible ARM native library is 31.2 FPS, about 30% difference.

 

At the same time, the analysis found that during the whole process, the CPU utilization rate and mobile phone current consumption increased to a certain extent when executing the ARM library through binary conversion compared with the native x86 library.

In contrast, the performance of compatible running ARM libraries is 30% lower than that of native executing x86 code, the average CPU utilization is increased from 58.9% to 73.4%, and the average current is increased from 621mA to 717mA, with an increase of about 100mA. In contrast, the CPU power consumption is increased by about 400mW, which is quite impressive.

Of course, the CPU utilization rate is only a side reflection. Because the kernel frequency is set to Ondemand by default during the test, although the difference in the utilization rate is small, the CPU runs longer at high main frequencies when the binary conversion executes ARM code, resulting in an increase in power consumption.

 

The final summary is as follows. It can be seen that compared with native execution of x86 code, the performance loss of binary conversion is still considerable. In the application of performance demands, the loss can be as high as 50%. In some game applications, the CPU power consumption will also increase by about 400mW.

 

Overall, x86 Android for There is still a long way to go, although through Intel The efforts of and manufacturers have solved the compatibility and performance problems, but the relatively harsh ecological environment makes it impossible to have both performance and compatibility. Unfortunately, Intel said this year that "the mobile phone business does not want to sell but only plays at the high-end". "Although the largest sales volume in the market is 1000 yuan mobile phones, it is not Intel's direction at present. Intel aims to make its presence in ”To some extent, the relatively low occupancy rate is still difficult to attract developers' attention and mobilize their enthusiasm, and it is still worrying about the improvement of the ecological environment.

 

Learn more about new cool devices, stay tuned

 

Related links:

Full interpretation of refusing to fool mobile GPU (I)

Full interpretation of refusing to fool mobile GPU (II)

High quality audio and video experience

Evaluation of the official version of the performance leader Galaxy S4 "4+4 core"

Where is "Super"? Performance comparison test of Xiaomi 2S

 

Share:
Igao7 Feiwei
edit
If you don't brush the machine, don't overclock, and don't bother, you will die
Share Weibo Share WeChat
 Aigoji WeChat

Aigoji WeChat

 WeChat

WeChat

Recommended products

Sorry, the product you are looking for is not available in the product library

on trial