donderdag 4 december 2014

64-bit Android phone

Over the coming months, we’ll see a lot of new phones trumpeting 64-bit processors. Should you run out to get one? Is 64-bit silicon twice as good as that crummy 32-bit technology we’ve been using for years? The short answer is no. The longer answer is that the move to a newer ARM architecture includes some nice enhancements, but being 64-bit isn’t, by itself, all that important.

Before you pull out your wallet to snag the first 64-bit Android phone (the HTC Desire 510), or begin salivating over any of the other 64-bit phones coming this fall, let’s discuss what the term 64-bit really means, and why you should, and shouldn’t, care about it.

Just what is a 64-bit processor, anyway?

Ask around, and you’ll hear numerous definitions of the term “64-bit processor.” Most often, you’ll hear that it means the processor can use more than 4GB of RAM. This isn’t really true, as a chip’s “bit count” doesn’t really have anything to do with how much memory it can address.

Processors use two kinds of numbers to perform operations like addition, multiplication, and moving or copying data in memory. You have your integers (whole numbers like 90210) and floating-point numbers (those with decimals like 3.14159265359). If a processor can handle integer operations up to 16 bits long, it’s a 16-bit processor. If it can handle a 32-bit integer operation, it’s 32-bit, and (you guessed it) a 64-bit processor can handle 64-bit integers.

Apple introduced the first 64-bit, ARMv8 phone processor last year with the A7.

A 32-bit processor also uses 32 bits to point to locations in memory, while a 64-bit processor uses 64 bits. That means that a single program can address only 4GB with a 32-bit chip, even if the processor itself can address more. A 64-bit processor points to memory locations using 64 bits, allowing individual programs to address 16 exabytes—a practically unlimited amount of memory.

For most apps, a 64-bit processor doesn’t offer much benefit. Most of the apps we use on our phones and tablets really don’t have much need for 64-bit integer operations, or more than 4GB of memory per program. In fact, a 64-bit app can sometimes run slower than a 32-bit app, because using all those 64-bit memory pointers can make the app larger, sucking up more cache and RAM.

So why are 64-bit mobile processors better?

The move from 32-bit to 64-bit ARM processors in our Android devices is just one development in a greater, much more important change: the move from the ARMv7 architecture to ARMv8.

For nearly the past decade, all the chips in our smartphones have been based on one principle set of supported instructions and features—ARMv7. All our modern smartphones, from the original iPhone and T-Mobile G1 through the iPhone 5 and Galaxy S5, have been built with processors that adhere to the ARMv7 specifications. Yes, ARMv7 has had its share of improvements and extensions over the years, but at its core, it’s still the same fundamental architecture we’ve been stuck with for almost a decade.

And ARMv7 is getting a little long in the tooth. So about three years ago, ARM introduced a new standard all the chip makers can build processors around—ARMv8.

ARMv8 includes a whole host of improvements. It takes all the ARMv7 instructions that today’s processors must handle by default, and streamlines them. New instructions for modern applications have been added, and old, depreciated instructions have been thrown out. Special instructions applicable to encryption have been added, too. What’s more, the spaces inside a processor where commonly used instructions and data are stored—they’re called registers—have roughly doubled in number in ARMv8. That’s a big deal, because it means an ARMv8 processor will spend less time pulling data from memory.

Qualcomm's first 64-bit chips are low- and mid-range. But high-end chips like the 810 are coming soon.

And, of course, ARMv8 is 64-bit capable, all while maintaining compatibility with older 32-bit ARM software.

When all is said and done, the new ARMv8 architecture is what makes 64-bit chips faster and more efficient, not merely the fact that they’re 64-bit. You don’t get one without the other, but it’s a lot easier to celebrate “64-bit” in a press release than try to explain the benefits of increased register space or a refined instruction set.

Is 64-bit really going to make a big difference?

Well, yes and no. The first Android products to bear 64-bit chips will offer performance that’s all over the map. The HTC Desire 510, for example, is a budget phone powered by a Qualcomm Snapdragon 410 processor. The Desire 510 is based on the ARMv8 architecture and is 64-bit, but it’s still a low-end handset that’s going to be slower than most of the high-performance phones already on the market. Qualcomm’s next 64-bit chips to hit the market will be the mid-range Snapdragon 610 and 615 chips—and they’re still nothing to get worked up about. The pedal really hits the medal early next year, when we expect devices bearing the high-end Snapdragon 810 chips.

On the other hand, we may see tablets sporting the dual-core 64-bit version of Nvidia’s Tegra K1 chip before the year is out, and that processor should be very fast, indeed.

Consider this: Apple’s iPhone 5S has a 64-bit mobile chip, and it has been on shelves for about a year. It’s very fast, but that hasn’t stopped Android phones from matching its performance with lowly 32-bit processors. Moral of the story: Faster processors are always on the way, 64-bit or not.

So, don’t be hoodwinked by the inevitable “64-bit” checkbox on the specs sheet. The move to ARMv8, 64-bit mobile processors is a very good thing, but not every 64-bit processor is faster than every 32-bit processor.

64-bit really needs Android L to shine

There’s one more piece to this puzzle: the operating system. If you buy a 64-bit phone with Android 4.4 KitKat on it, you won’t really unlock its potential until it gets an upgrade to Android L.

You see, to properly utilize ARM’s new 64-bit architecture, you’ll need both operating system and application support. Android L has been designed to fully support ARMv8 and 64-bit platforms, while KitKat has not. But what about apps? Do you need to wait for app developers to create special 64-bit-optimized versions of their apps?

Android L brings with it a ton of new features, among which is full support for ARMv8 and 64-bit.

Well, apps will get faster and more efficient when developers optimize for these new chips, but you may not have to wait to see benefits. On Android, most apps are based on Java. So when you download an Android app, you’re really grabbing a package of zipped-up code and libraries that the Android OS turns into a functional program that can be understood by your phone’s processor. This is called “compiling.”

The compiler in Android L, known as ART, is made to produce code that’s optimized for the new ARM architecture. So, with Android L and a 64-bit processor in your phone or tablet, your apps could run faster without a developer lifting a finger to make special optimizations. And if they do make those optimizations, their apps could run even better.

By this time next year, we’ll have forgotten all about 64-bit

Marketing departments love the term 64-bit. Any time they can put a number twice as big on the box, they’re going to. You’re using a 32-bit phone now, so if you’re anything like the typical human, your emotional triggers will tell you a 64-bit phone is twice as fast. It’s why we see cameras crammed with more megapixels, and processors with more cores. More always equals better, right?

In this case, the marketing departments aren’t wrong, they’re just overstating the importance of 64-bit to the Android market. Yes, the new ARMv8 architecture—which brings 64-bit computing along for the ride—has a number of nice enhancements. And, yes, so does Android L, which is necessary to take advantage of the new architecture. But better processors and operating systems roll out every year. They’re never twice as good as last year’s, and these won’t be, either.

Within a year, nearly every hot new phone or tablet will contain a 64-bit-capable chip. Even the cheap ones. Android L will be everywhere, and we’ll already be pining for the next version of Android. 64-bit will no longer be a selling point worth calling out on marketing materials, and we’ll wonder why we ever made such a big deal about it in the first place.