SoC Analysis: On x86 vs ARMv8

Before we get to the benchmarks, I want to spend a bit of time talking about the impact of CPU architectures at a middle degree of technical depth. At a high level, there are a number of peripheral issues when it comes to comparing these two SoCs, such as the quality of their fixed-function blocks. But when you look at what consumes the vast majority of the power, it turns out that the CPU is competing with things like the modem/RF front-end and GPU.


x86-64 ISA registers

Probably the easiest place to start when we’re comparing things like Skylake and Twister is the ISA (instruction set architecture). This subject alone is probably worthy of an article, but the short version for those that aren't really familiar with this topic is that an ISA defines how a processor should behave in response to certain instructions, and how these instructions should be encoded. For example, if you were to add two integers together in the EAX and EDX registers, x86-32 dictates that this would be equivalent to 01d0 in hexadecimal. In response to this instruction, the CPU would add whatever value that was in the EDX register to the value in the EAX register and leave the result in the EDX register.


ARMv8 A64 ISA Registers

The fundamental difference between x86 and ARM is that x86 is a relatively complex ISA, while ARM is relatively simple by comparison. One key difference is that ARM dictates that every instruction is a fixed number of bits. In the case of ARMv8-A and ARMv7-A, all instructions are 32-bits long unless you're in thumb mode, which means that all instructions are 16-bit long, but the same sort of trade-offs that come from a fixed length instruction encoding still apply. Thumb-2 is a variable length ISA, so in some sense the same trade-offs apply. It’s important to make a distinction between instruction and data here, because even though AArch64 uses 32-bit instructions the register width is 64 bits, which is what determines things like how much memory can be addressed and the range of values that a single register can hold. By comparison, Intel’s x86 ISA has variable length instructions. In both x86-32 and x86-64/AMD64, each instruction can range anywhere from 8 to 120 bits long depending upon how the instruction is encoded.

At this point, it might be evident that on the implementation side of things, a decoder for x86 instructions is going to be more complex. For a CPU implementing the ARM ISA, because the instructions are of a fixed length the decoder simply reads instructions 2 or 4 bytes at a time. On the other hand, a CPU implementing the x86 ISA would have to determine how many bytes to pull in at a time for an instruction based upon the preceding bytes.


A57 Front-End Decode, Note the lack of uop cache

While it might sound like the x86 ISA is just clearly at a disadvantage here, it’s important to avoid oversimplifying the problem. Although the decoder of an ARM CPU already knows how many bytes it needs to pull in at a time, this inherently means that unless all 2 or 4 bytes of the instruction are used, each instruction contains wasted bits. While it may not seem like a big deal to “waste” a byte here and there, this can actually become a significant bottleneck in how quickly instructions can get from the L1 instruction cache to the front-end instruction decoder of the CPU. The major issue here is that due to RC delay in the metal wire interconnects of a chip, increasing the size of an instruction cache inherently increases the number of cycles that it takes for an instruction to get from the L1 cache to the instruction decoder on the CPU. If a cache doesn’t have the instruction that you need, it could take hundreds of cycles for it to arrive from main memory.


x86 Instruction Encoding

Of course, there are other issues worth considering. For example, in the case of x86, the instructions themselves can be incredibly complex. One of the simplest cases of this is just some cases of the add instruction, where you can have either a source or destination be in memory, although both source and destination cannot be in memory. An example of this might be addq (%rax,%rbx,2), %rdx, which could take 5 CPU cycles to happen in something like Skylake. Of course, pipelining and other tricks can make the throughput of such instructions much higher but that's another topic that can't be properly addressed within the scope of this article.


ARMv3 Instruction Encoding

By comparison, the ARM ISA has no direct equivalent to this instruction. Looking at our example of an add instruction, ARM would require a load instruction before the add instruction. This has two notable implications. The first is that this once again is an advantage for an x86 CPU in terms of instruction density because fewer bits are needed to express a single instruction. The second is that for a “pure” CISC CPU you now have a barrier for a number of performance and power optimizations as any instruction dependent upon the result from the current instruction wouldn’t be able to be pipelined or executed in parallel.

The final issue here is that x86 just has an enormous number of instructions that have to be supported due to backwards compatibility. Part of the reason why x86 became so dominant in the market was that code compiled for the original Intel 8086 would work with any future x86 CPU, but the original 8086 didn’t even have memory protection. As a result, all x86 CPUs made today still have to start in real mode and support the original 16-bit registers and instructions, in addition to 32-bit and 64-bit registers and instructions. Of course, to run a program in 8086 mode is a non-trivial task, but even in the x86-64 ISA it isn't unusual to see instructions that are identical to the x86-32 equivalent. By comparison, ARMv8 is designed such that you can only execute ARMv7 or AArch32 code across exception boundaries, so practically programs are only going to run one type of code or the other.

Back in the 1980s up to the 1990s, this became one of the major reasons why RISC was rapidly becoming dominant as CISC ISAs like x86 ended up creating CPUs that generally used more power and die area for the same performance. However, today ISA is basically irrelevant to the discussion due to a number of factors. The first is that beginning with the Intel Pentium Pro and AMD K5, x86 CPUs were really RISC CPU cores with microcode or some other logic to translate x86 CPU instructions to the internal RISC CPU instructions. The second is that decoding of these instructions has been increasingly optimized around only a few instructions that are commonly used by compilers, which makes the x86 ISA practically less complex than what the standard might suggest. The final change here has been that ARM and other RISC ISAs have gotten increasingly complex as well, as it became necessary to enable instructions that support floating point math, SIMD operations, CPU virtualization, and cryptography. As a result, the RISC/CISC distinction is mostly irrelevant when it comes to discussions of power efficiency and performance as microarchitecture is really the main factor at play now.

SoC Analysis: Apple A9X SoC Analysis: CPU Performance
Comments Locked

408 Comments

View All Comments

  • ddriver - Sunday, January 24, 2016 - link

    Bing is a professional application for every professional lamer. To the latter, the ipad "pro" is a professional product too.
  • ddriver - Sunday, January 24, 2016 - link

    LOL At most 2 or 3 of those could qualify for "professional" if one is inclined to be generous with the labels.

    Professional applications - photoshop, 3d max, maya, solidworks, coreldraw, indesign, visual studio, cubase, pro tools, after effects, fusion, z-brush, and so on.
  • 10101010 - Friday, January 22, 2016 - link

    Yeah, I'm sure that's why the combined "hammer + screwdriver" tool market is just booming.
  • ddriver - Friday, January 22, 2016 - link

    Yeah, I am sure making good analogies is not your strong point.

    A more appropriate analogy would be those screwdriver kits with a single handle and interchangeable tips, saving you the effort to carry around 20 different screwdrivers, and those kits are GREAT ;)

    But we aren't talking just any hardware here, we are talking computers, and general purpose at that, this is not the case of some special purpose hardware. This is a general purpose computer, and what it does is defined entirely by its software. Absent any software, it is just a paper weight, or a serving tray, absent professional software it is just a toy, intended to milk people out of their money.
  • lmcd - Tuesday, February 9, 2016 - link

    I mean, a lot of the times they are bought in bundles ;)
  • abazigal - Friday, January 22, 2016 - link

    Possibly because there isn't a hybrid that is as good as a dedicated laptop and a dedicated tablet. You are essentially trading one set of compromises for another, and people's mileage will vary.
  • ddriver - Friday, January 22, 2016 - link

    So a "hybrid" being 10% heavier and 10% thicker than a tablet, and 10% slower than a laptop justifies buying and carrying a tablet and a laptop instead of a hybrid?

    Obviously, a hybrid will be a little slower than a laptop and a little heavier than a tablet, but in many cases that is not detrimental. People should have the option to use their devices to the full extent of their capabilities, and whoever needs the extra horsepower will buy a laptop or even a desktop system instead.

    I really don't understand how come people have such a big problem with maximizing a device capability and productivity? IN what way will the availability of professional software for iOS hurt you?
  • 10101010 - Saturday, January 23, 2016 - link

    I just don't see a "hybrid" being defined primarily by size, weight, or speed. If we look at a hybrid such as the "Surface Pro", it is defined mostly by its Windows 10 operating system. This is an insecure loaded-with-spyware-at-the-factory desktop OS that pretends to be a tablet OS, laptop OS, server OS, phone OS, etc. There are really no great Windows apps made specifically for a tablet (although a few work nicely with a pen/stylus). So at the end of the day what is a Surface Pro "hybrid" really? It is a desktop OS and a keyboardless laptop. It's marketed as "best of both" but really it is a Frankenstein computer made of parts that Microsoft sawed off other products.

    Contrast Microsoft's Frankenstein with the iPad Pro -- a tablet built to be a tablet that runs what is widely regarded as the most stable, secure, and highest quality mobile OS. And delivers the closest thing yet to "paper and pencil" functionality to the market. Your point about the professional software is right on. As the apps evolve for the iPad Pro and more professional apps become available, it will only expand what an iPad Pro can be used for, opening the tablet up to being useful for more customers.
  • ddriver - Saturday, January 23, 2016 - link

    I am sure iOS is spying on users as much as Windows 10, after all, M$ was largely inspired by Apple in this regard. And unlike W10, you can't really disable it in iOS.

    Unfortunately, the lack of professional applications, whose UI is usable on a tablet is true, be those windows, android or ios tablets. I do acknowledge that the only reason windows tablets have the upper hand is they can run the good old legacy professional software, which is a pain in the ass to use without a mouse and keyboard.

    It would seem that the industry is rather unimaginative, they keep releasing new versions of their professional products, but don't adopt a better paradigm for user interaction, one that would work equally well on a traditional desktop PC and a tablet. Software giants are just as lazy and unimaginative as hardware giants.

    And it is not like it is impossible, it is well within the realm of possibility to adapt the UI for wider device usage without impairing productivity, if anything, a more clever design will make application interaction easier, a lot of the professional app UIs are a pain to work with, even with a mouse, and practically impossible to use with a touch device.

    One of the projects I am currently working on is a graphical programming language / IDE, capable of producing commercial grade software, and it is equally useful on a desktop with mouse and keyboard and on a tablet or even on a phone with touch. It is 2-3 months away from public release, unfortunately due to apple's policies, I will not be publishing to their store, since they don't really allow the degree of freedom an application development tool requires. It will still be available for jail broken apple hardware.
  • Constructor - Saturday, January 23, 2016 - link

    I am sure iOS is spying on users as much as Windows 10, after all, M$ was largely inspired by Apple in this regard. And unlike W10, you can't really disable it in iOS.

    That is just nonsense. Apple is very careful about looking at user data, and in fact they credibly follow the tenet "the less of your information we look at, the better!".

    That is not how Microsoft is proceeding with Windows 10 – there they seem to go more the Google route.

Log in

Don't have an account? Sign up now