Apple Watch Apps Instantly Went 64-Bit Thanks To Obscure Bitcode Option (venturebeat.com) 149
Jeremy Horwitz, writing for VentureBeat: An obscure feature in Apple's Xcode development software enabled Apple Watch apps to make an instant transition from 32-bit to 64-bit last month, an unheralded win for Apple Watch developers inside and outside the company. The "Enable Bitcode" feature was introduced to developers three years ago, but the Accidental Tech Podcast suggests that it was quietly responsible for the smooth launch of software for the Apple Watch Series 4 last month.
Support for Bitcode was originally added to Xcode 7 in November 2015, subsequently becoming optional for iOS apps but mandatory for watchOS and tvOS apps. Bitcode is an "intermediate representation" halfway between human-written app code and machine code. Rather than the developer sending a completely compiled app to the App Store, enabling Bitcode provides Apple with a partially compiled app that it can then finish compiling for whatever processors it wants to support. The report suggests that this change allowed Apple to avoid the great "appocalypse" which occurred when it decided to kill support for 32-bit apps on iOS.
Support for Bitcode was originally added to Xcode 7 in November 2015, subsequently becoming optional for iOS apps but mandatory for watchOS and tvOS apps. Bitcode is an "intermediate representation" halfway between human-written app code and machine code. Rather than the developer sending a completely compiled app to the App Store, enabling Bitcode provides Apple with a partially compiled app that it can then finish compiling for whatever processors it wants to support. The report suggests that this change allowed Apple to avoid the great "appocalypse" which occurred when it decided to kill support for 32-bit apps on iOS.
Re: (Score:2)
Or IRIX. I had my first 64-bit desktop machine around 1996 (SGI Indigo).
Re: (Score:2)
No, he surely didn't, and it was no where near as fast or powerful as the watch. But, that doesn't matter. The interesting thing has nothing to do with the Apple Watch 4 being a 64bit wide architecture.
The interesting thing in this story (for all the non-programmers out there), is the IDE handling natively the cross-compilation difficulties of moving between 32 and 64 bits. That means it is allocating memory and changing data types of objects at compile-time.
Pretty cool stuff.
Re: (Score:3)
Sure it was clumsy and inconvenient, but boy did I look cool!
Re: 64-bit? Sun Microsystems says "Hi!" (Score:2)
Some of the mainframes where rocking 64 not address spaces well back to the early 80s and possibly earlier. Million dollar machines though.
I'm sure they needed it too (Score:1)
Did Apple Watches suddenly gain some dire need for 64-bit address space?
Re: (Score:1, Troll)
And huff and puff and pretend that 64 bit is not more power hungry than 32 bit. Apple cultists somehow overlooking that, once again, this watch only has 18 hours endurance unless you basically turn it off. Some watch.
Re: (Score:3, Informative)
this watch only has 18 hours endurance unless you basically turn it off. Some watch.
Funny mine lasts 2 to 3 days...
Re: (Score:2, Funny)
Re: (Score:2)
Also every 2 to 3 months there's a new model and everyone wants to switch.
Re: (Score:2)
It lasts around two and a half days for me, and I charge it every night. I'm not sure why I'd need more battery life from a smartwatch.
Re: (Score:2)
Why? Right now you're charging it every night.
Imagine if it was only once a month.
Re: (Score:1, Offtopic)
Huawei's Watch 2 claims two days of battery life under normal use. [cnet.com] That's 2.5 times better than Apple. And the Huawei looks good with its round body, unlike Apple's clunky/ugly phone-on-a-wrist. No wonder Huawei got such a big chunk of the market already. And they are said to be bring out a product with a full week of battery life. [slashgear.com] There you go, Huawei concentrates on what's important for a watch. Apple brags about more bits.
Re: (Score:2)
Huawei's Watch 2 claims two days of battery life under normal use. [cnet.com] That's 2.5 times better than Apple. And the Huawei looks good with its round body, unlike Apple's clunky/ugly phone-on-a-wrist. No wonder Huawei got such a big chunk of the market already. And they are said to be bring out a product with a full week of battery life. [slashgear.com] There you go, Huawei concentrates on what's important for a watch. Apple brags about more bits.
What is offtopic about that?
Re: (Score:3, Insightful)
The fact that you consider 5.2% of the market to be "a big chunk" when this thread is about Apple watch applications (and Apple has 18% of the market).
Aduh.
Re: (Score:2)
Your numbers are out of date. Huawei smartwatch market share is only 2 points behind apple.
Re: (Score:2)
Wrong. [idc.com] Try at least 10 points behind. Still.
Re: (Score:2)
17.01% Apple, 15.1% Huawei, from your own link. You need to get glasses.
Next year, this time, Apple will be 5% behind Huawei. Mark it down.
Re: (Score:2)
I need glasses? 6.5% Huawei.
But since Xiaomi also has 6 letters, an 'a', and an 'i', I guess that they're one and the same in your eyes. As a matter of fact, Garmin does too, so you can just add those three together in some sort of delusional merger.
Re: (Score:2)
Ah, of course I meant Xiaomi. However, since you are a rude, obnoxious Apple partisan, like most Apple employees, you will do your best to make an issue of that. Bottom line: Apple rapidly losing ground in the smartwatch segment because of designing an inferior product with unacceptable battery life, that is just plain ugly. In short, something only an Apple diehard could love. Carry on.
BTW, Apple should be concerned about Huawei's share too. Both are likely to eclipse out-of-ideas Apple.
Re: (Score:2)
You most certainly did not. Every single post of yours above the last was about Huawei.
Even switching to Xiaomi cannot help you. Their marketshare is smaller and not growing as rapidly. Apple cannot lose ground to Xiaomi while accelerating away.
I'm a reality partisan that neither owns an Apple watch nor works for Apple (or any Apply supplier). An
Re: (Score:2)
You are obsessed. Your jowls are shaking, spittle is dripping off your chin. Righteous indignation of a diehard Apple apologist.
And Apple watch is a piece of junk that nobody should waste their hard earned money on. If you need a smartwatch then buy Samsung, Fitbit, Xiaomi or Huawei, companies that actually care about making a good looking, usable product. Oh, and Apple products tend to explode. [digitaltrends.com]
Re: (Score:2)
Waving the white flag, eh? You literally cannot come up with anything except for ad hominems that project your own feelings onto others?
Which is why millions are sold every quarter, and they're the market leader.
Re: (Score:2)
Wow, you are obsessed, do you have a life? Looks like no. So you admit, Apple products do explode as everybody knows. In fact, Apple products explode explode a lot. Think Pinto. They also electrocute people.
Re: (Score:2)
Asks the person (I asusme) that replies to absolutely everyone, usually with provably wrong drivel, at a rate that far exceeds my own posting rate. You're projecting - again.
You seem oddly fixated on ignoring that all the others explode a well, as everyone knows.
Less frequently than the others. Have fun proving otherwise. Wait, you almost never
Re: (Score:3)
Two days of battery life under normal use is less than the Apple Watch, though.
Re: (Score:2)
If my watch only lasted 2.5 YEARS on a single charge I'd be pissed.
Re: (Score:1)
And huff and puff and pretend that 64 bit is not more power hungry than 32 bit. Apple cultists somehow overlooking that, once again, this watch only has 18 hours endurance unless you basically turn it off. Some watch.
To Apple employees with mod points: modding down a Slashdot post does not fix the pathetic Apple watch battery life.
You know, I really detest Apple. Every time an Apple astroturfer heads out to social media to mod down posts, I detest Apple more. Rightly so. Fix your exploding phones, overheating chargers and battery challenged watch instead of just acting like Scientogistis.
Apple: the Scientology church of tech companies. You know what a Scientologist would do? Mod this down. Scientology Church of Apple.
There, see? Apple: exactly the Scientology cult everybody thinks it is.
Re: (Score:3)
A life so sad that you're forced to reply to yourself, over, and over, and over...
Re: (Score:2)
You seem obsessed.
Re: (Score:2)
Then 65 bit!
Re: (Score:1)
You can never have too many bits, you know. I'm surprised Apple stopped at 64. At those prices, I'm thinking they should have at least like several hundred bits. Also, the iWatch should be able to sense when a nearby woman is menstruating so I can run far away (or not, depending on your particular tastes).
I might try a smart watch when they get under $100, but until then, I'm just going to have to take y'all's word for it. I guess
Re:I'm sure they needed it too (Score:5, Informative)
There are other gains to be had. For instance, updating apps to 64-bit means that everything links against Apple's 64-bit library binaries. As a result, Apple can drop the 32-bit binaries from watchOS, leading to less maintenance, smaller and faster system update downloads, and more space available for the user to use on the device. Given that these are rather constrained devices, every little bit (pun intended) helps.
Re: (Score:2)
Sure - because it uses more resources!
Re: (Score:2)
Sure - because it uses more resources!
No. Because ARM architecture works that way.
Re: (Score:2)
64 bits, it's what plants crave!
Re: (Score:1)
Apple can drop the 32-bit binaries from watchOS, leading to less maintenance
So you are saying, better for Apple, who cares about the user.
smaller and faster system update downloads
Wrong. 64 bit binaries are more bulky than 32 bit.
and more space available for the user to use on the device
Wrong again. On the device you only have 32 bit binaries/libraries or 64 bit. Unless Apple is really stupid, but that is another issue.
Wrong, wrong, wrong. Typical Apple "facts".
Re: (Score:2)
Apple can drop the 32-bit binaries from watchOS, leading to less maintenance
So you are saying, better for Apple, who cares about the user.
Yep. Surely it would be better to automatically make all watch apps 32-bits to save space.
(given that they can choose by flipping a switch)
Re: (Score:2)
Given that Apple is now using a 64 bit processor for this new line, the alternatives for the user involve having either a set of BOTH 64 bit binaries and 32 bit binaries a la Windows, or barely any apps for their new device.
Having both would most certainly be more bulky then only the 64 bit option. Using 32 bit binaries might be possible, but it seems like a waste of a 64 bit processor.
As the 32 bit line dies out, devs responsible for it can be moved to maintaining the 64 bit branch. The user seems well ser
Re: (Score:2)
As the 32 bit line dies out, devs responsible for it can be moved to maintaining the 64 bit branch. The user seems well served.
Huh? Apple is well served, not the user.
Re: (Score:3)
The user sees no benefit from a simplified development toolchain, huh? You are management material, I'll give you that.
Re: (Score:2)
Yours is not a simplified development toolchain, it is an amplified bullshit chain.
Re: (Score:2)
"Yours"?
Re: (Score:2)
Wow... you do this bullshit even with other people, but accuse me of being "obsessed."
*smirk*
Re: (Score:2)
Every noticed how this kind of talk, including the drivel you posted, tends to center around Scientology House Apple?
Re: (Score:3)
Most apps aren't really making use of 64-bits. The OS could make use of this if it needs more address space but those watches generally don't have that much all running at the same time. So now you have long registers most of which are rarely used.
The difference between 16 and 32 bit was huge, because there were many applications that found limitations on the address space and were already commonly doing 32-bit arithmetic. Fo 32 to 64 bit on the PC it wasn't all that big a deal overall; we already had 64
Re: I'm sure they needed it too (Score:2)
Re: (Score:2)
Wrong. 64 bit binaries are more bulky than 32 bit.
Idiot very much today?
64bit binaries plus 32bit binaries are even more bulky than 64bit binaries alone! And that was the parents point.
On the device you only have 32 bit binaries/libraries or 64 bit.
Obviously you are not a software developer. Obviously you have both kinds of libraries, unless the binaries are statically linked and don't need libraries on the device.
Re: (Score:2)
Maintaining only one code base, rather than two, is better for both.
Wrong. 64 bit + 32 bit is larger than 64 bit.
Because you've dropped 32-bit bin
Re: I'm sure they needed it too (Score:1)
Automatic, zero bit watches still rule the roost.
Re:I'm sure they needed it too (Score:5, Funny)
Did Apple Watches suddenly gain some dire need for 64-bit address space?
If you don't switch to a 64-bit watch now, it will stop working in the year 2038!
Re: (Score:2)
Until then, we are all doomed on Sunday, December 4th of 292,277,026,596!
Re: (Score:2)
"64-bit ARM" (AArch64) is actually a different instruction set architecture: it is more modern and has more potential to run faster.
It also supports the "AArch64-ilp32" ABI which restrict its pointers to 32 bits, so that it does need to use a 64-bit address space and waste memory on high bytes of pointers that are never used.
But personally, I think a smart watch should have a slimmed-down extremely power-efficient CPU so that battery life times could start approach that of special-purpose watchbands and old
Re: (Score:2)
I guess if nothing else it will still function after 2038.
Re: (Score:2)
So other than addressing >4Gb of memory, what are the upsides?
Re:Because "64bit" is somehow inherently better? (Score:5, Informative)
So other than addressing >4Gb of memory, what are the upsides?
64-bit ARM processors have more than double the number of general purpose registers than 32 bit ARM processors have. This can speed up code considerably, by reducing the number of load/store instructions needed when you have half the registers. And as decisions as to register use is done at compile time (and not at runtime), this benefits 64-bit code mores than 32-bit code (as the compiler has to presume the lowest common denominator, and all compile 32-bit code assuming the 15 general purpose registers found on 32-bit ARM CPUs).
The big upside for Apple of course is no longer needing to maintain or ship any legacy 32-bit codebases. All current Apple devices now feature a 64-bit CPU, so Apple can get rid of 32-bit kernel support. If all apps are required to be 64-bit, Apple doesn't need to maintain or ship 32-bit system libraries. Xcode will be simplified, as there won't the any need for 32-bit build tools or targets.
Not having to maintain the massive amount of 32-bit support code inside Apple's various OS's will be a big win for Apple -- but that win will also trickle down to end-users, as Apple will be able to put more effort and emphasis on common codebases for their entire product line, and can put development resources that were being used to maintain 32-bit support to other tasks.
Yaz
Re: (Score:2)
Not having to maintain the massive amount of 32-bit support code inside Apple's various OS's will be a big win for Apple
So will we all just abandon to the scrap heap all the very expensive Apple devices that already exist and are still working? You know, all the 32 bit devices?
If Apple is not supporting 32 bit OSs anymore, then are app developers going to have to keep a copy of XCode 7 or whatever that does support the vast number of legacy devices?
Re:Because "64bit" is somehow inherently better? (Score:5, Informative)
So will we all just abandon to the scrap heap all the very expensive Apple devices that already exist and are still working? You know, all the 32 bit devices?
All of the old software and development tools still work if you need to target a really old device.
Apple has been primarily 64-bit for a very long time now. 64 bit support for OS X came out in 2005, all new Macs had 64-bit hardware by 2007, and in 2011 64 bit became required with Mac OS X Lion (10.7). The iPhone has been 64 bit since the iPhone 5s (2013). AppleTV has been fully 64-bit for two generations now (since 2015), however it needs to be noted here that prior to the 2015 model, the AppleTV didn't permit 3rd party apps anyway.
And as this article indicates, bitness of the tvOS and Apple Watch devices matters less, as Apple accepts the applications as byte code from the vendors, and can compile it on the fly for specific devices in whatever bitness they support. As such, your device has to be quite old to need 32 bit support, and Apple for at least the last year has required all apps submitted to its app stores to be 64-bit.
If Apple is not supporting 32 bit OSs anymore, then are app developers going to have to keep a copy of XCode 7 or whatever that does support the vast number of legacy devices?
The number isn't as vast as you are implying. Unsupported Macs would have to be at least 12 years old now. Unsupported iOS devices are more than 5 years old at this point. The AppleTV has never had a revision that permitted 3rd party apps which wasn't 64 bit. It's only on the Apple Watch where there is a currently supported 32 bit OS -- and as the article indicates, Apple got around much of the issues between 32-bit and 64-bit versions by having byte code based apps which it can compile to the necessary architecture on the fly on your behalf.
So yes -- if you for some reason really have to target old 32 bit devices, at some point you'll need an older Xcode around. Presumably you're deploying these to the devices yourself, as the App Store hasn't permitted 32-bit apps for at least the last year. Next year macOS is dropping 32-bit application support altogether.
Yaz
Re: (Score:2)
Next year macOS is dropping 32-bit application support altogether.
Will Wine then have to become actually an emulator?
Re: (Score:2)
Will Wine then have to become actually an emulator?
I suspect you'll have to run it in a VM. 64-bit WINE exists, however there is a major incompatibility with 64-bit macOS that causes issues, where the only workaround appears to be using emulation. [winehq.org]
Yaz
Re: (Score:3)
You pay for additional registers with increased context switch latency. It's not really a slam dunk. Some architectures only make you pay on a context switch for registers you used, but if you're not using them then you probably didn't need them, so assumed an efficient program uses all the registers.
Having lots of registers and good swizzle operations can help SIMD (single instruction, multiple dispatch). But that doesn't come out of the general purpose register set on most architectures.
Your CPU architect
Re: (Score:2)
You pay for additional registers with increased context switch latency. It's not really a slam dunk.
Agreed -- the potential for performance increases isn't linear, and isn't guaranteed for all possible workloads. But so long as the increase in context switch latency is less than a non-trivial programs full load/store set, you'll still see performance improvements.
I highly suspect this choice makes as much sense for bean counters than it does for technical reasons.
I suspect the bean counters see the biggest benefit from the software side, with no longer having to maintain parallel 32-bit and 64-bit codebases and/or build apparatus. An Apple developer fixing a bug in a system library currently needs to a)
Re: (Score:2)
SIMD (single instruction, multiple dispatch^H^H^H^H^H^H^H^Hdata).
FTFY.
Re: (Score:2)
64-bit ARM processors have more than double the number of general purpose registers than 32 bit ARM processors have.
More transistors, more power suck. On a device that doesn't need the extra performance, it would benefit much more from extra battery life.
Spin, spin, spin. Admit it, the only useful purpose of 64 bits CPU on a watch is a bigger number.
Re: (Score:2)
Spin, spin, spin. Admit it, the only useful purpose of 64 bits CPU on a watch is a bigger number.
As an end-user there may be no obvious benefit to you, but as I've mentioned it's of benefit to Apple, especially on the software development side.
watchOS shares code with iOS, tvOS, and macOS. There are big benefits for Apple by being able to keep all of these 64-bit from top to bottom; it makes little sense for Apple to keep developing 32 bit development, build tooling, and kernel and library code just for watchOS, when all of their other platforms are 64-bit.
Yaz
Re: Because "64bit" is somehow inherently better? (Score:2)
More transistors means more power, all things being equal.
However, if you finish your job faster you can sleep faster, which probably uses less power overall. Thats the basic power philosophy of iOS. You can't just look at one thing and say it's more expensive; it's how it impacts the overall system's performance that matters. That's one difference in how Apple does things, or at least how they used to do things.
Re: (Score:2)
Better instruction set
larger registers
more registers
Re: (Score:2)
Yep. 32-bit languages totally can't have a 64 bit data type.
(or double precision math - not a lot of people know that 32-bit apps are limited to single precision!)
Be afraid, be very afraid (Score:2)
Yeah, having to use two CPU registers to hold my file offsets was a real chore. It was impossible for 20 year old Unix systems to add system calls to with names like lseek64(). We can only write software that is as simple as possible, and we would never include even slightly complicated interfaces to do something as basic as accessing large files.
Also 32-bit systems never offer 64-bit values for time stamps, so those will all explode in the year 2038. You don't want your obsolete 32-bit watch to EXPLODE do
Re:Because "64bit" is somehow inherently better? (Score:5, Informative)
64bit ARM architectures are more power efficient than the older 32bit ones. ARMv8 is a more advanced instruction set than ARMv7.
Re: (Score:2)
And if that was the only thing that the watch had to do, that observation would be relevant.
But it is not.
Re: (Score:2)
The Pascal-P system did it with "p-code" back in the 1970's ...
And Open Software Foundation's ANDF system for Unix programs written in C back in the early '90s.
The "bitcode" is not an Apple invention, but is a file encoding for LLVM-IR, the intermediate representation of programs used internally by the LLVM/clang compiler. ... but Apple's App Store is not really a distributed system either but a funnel through which all "watchOS" apps have to go, so
LLVM-IR is very much not suitable for program distribution
"obscure"? (Score:1)
it was mandatory on the platform for THREE FUCKING YEARS. hardly 'obscure'.
LLVM bitcode is NOT target-independent. (Score:2)
LLVM bitcode contains (and needs) the datalayout of the target. This datalayout means such things as default data sizes and alignment rules. Pointer size is different for 32- and 64-bit architectures, so same LLVM bitcode cannot work in both 32- and 64-bit mode.
So, bitcode alone cannot explain portability to 64-bit.
It might be that the development tools have compiled separate bitcode files for 32-and 64-bit architectures.
Re: (Score:2)
Data layout is optional. Even if it wasn't there's no reason Apple can't modify it for different targets when it does the compilation to machine code.
All software should have this in all OSs. (Score:2)
Frankly it is ridiculous that this sort of thing is even a problem. Apple, Google, Microsoft, etc should all be offering the ability to translate or run all 8-bit, 16-bit, 32-bit and 64-bit software on the newer OSs and hardware. It is an easy problem. They should also be offering emulation or JITC (Just In Time Compilation) or FRTC (First Run Time Compilation) for all older software to run on the newer hardware and OSs.
Re: (Score:2)
you can already do that with vmware and other virtualizations, run CP/M or whatever
Re: (Score:1)
So its basically Java for the apple side.
So when I want to see the time on my apple watch at 2:40pm based on my laptop clock, the java compiler will speed up time, since it will be at least 2:41pm before the watch is ready to display the time, after doing all the GC, updates, and other critical functions.
So when I set an alarm for 6:00, to wake up at 6:05, when the watch has finished running all the ancillary processes to harvest whatever data is available, and at 6:10, after hitting the silence button only 25 times, the alarm will silence.
What great features!
With iOS 12, my phone now takes about 40 seconds to render the keypad before it calls 911.
Funny. Out of all the betas and reviews of iOS 12, isn't it amazing you are the only one to experience that?
Re: (Score:2)
Everyone else is having charging issues, signal strength issues, antenna issues, front facing camera issues.
What a piece of shit apple produced
First off, "signal strength issues" and "antenna issues" are inextricably linked; so thanks for trying to get two bites at the same apple (see what I did there?).
If by "Front-Facing Camera Issues" you are talking about the difference in the smoothing algorithms in the iPhone Xs, that is simply a misunderstanding of how it works:
https://www.macrumors.com/2018... [macrumors.com]
As for the Charging Issues, the Jury is still "out" on that one...
Re: (Score:2)
.... except the compiling happens in the app store infrastructure, not on the watch. So nothing like Java's byte code and JIT compilation. Not even like Android and it's ART runtime, that compiles the code when it's installed.
Re: (Score:2)
Yeah, nothing like it. Compiling on a computer that sits on your desk is totally different than compiling on a computer that sits in your pocket or on a computer that straps to your arm. Even if those computers are architecturally similar if not identical. The key take away here is the shape and location of your compute is vitally important to this definition of what makes Java and JIT distinctive.
Re: (Score:2)
Yeah, nothing like it. Compiling on a computer that sits on your desk is totally different than compiling on a computer that sits in your pocket or on a computer that straps to your arm. Even if those computers are architecturally similar if not identical. The key take away here is the shape and location of your compute is vitally important to this definition of what makes Java and JIT distinctive.
Hey dumbass.
The compilation is done on Apple's SERVERS, before the App is downloaded to your device.
Re: (Score:2)
Re: (Score:2)
A server is a computer sitting in a rack instead of on a desk.
Really? I never would have known that, thanks!
Idiot.
Re: (Score:2)
Isn't the point the battery powered device doesn't need to compile any code? That takes power.
Re: (Score:2)
So it's a bit like UCSD P-code?
https://en.wikipedia.org/wiki/... [wikipedia.org]