Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
If you are a developer, then you should know that just by recompiling the your application to 64-bit you are gaining performance benefits of having more registers, more efficient function calls, etc. Not to mention the access to faster 64-bit frameworks. And as I said above, if the application is coded following the good programming practices, then it should compile to 64-bit without any work at all. Or are you using assembly extensively through your projects?

What registers are you accessing directly in your code? And what data structures do you have that are working with 64-bit? Yes, some of the framework may take advantage of 64-bit but it is a far cry from optimizing for it.

Recompiling a 32-bit app for 64-bit is easy. Taking advantage of 64-bit, or more to the point (in terms of the types of apps on the iPhone) needing 64-bit is a very different beast.

----------

:confused: This thread? I haven't seen a single post that implies that (other than yours, of course.)



Okay? Not arguing with any of that. I just have no idea what it has to do with what I said.

Um, did you read the first post?
 
What registers are you accessing directly in your code?

:confused: The compiler translates your program to machine code. A 64-bit instruction set means more local variables can be stored in registers = more opportunity for optimisation. Same with function calls. The compiler does this all for you.

And what data structures do you have that are working with 64-bit?

Errm, all of them? Did you even read the Apple's 64-bit transition guide for iOS? Sure, with the 64-bit processor you can try and utilise the additional processing power on 64-bit ints, but I don't see how that would be relevant for most applications out there. Cryptography comes to mind, so does compressing. What else? I am not sure. What kind of application would benefit from higher bitops throughput? And for high-performance numerical computations you should use the accelerate framework or something similar - which will fully take advantage of the 64-bit architecture.

Recompiling a 32-bit app for 64-bit is easy. Taking advantage of 64-bit, or more to the point (in terms of the types of apps on the iPhone) needing 64-bit is a very different beast.

And I ask you again - what kind of application do you have that you must explicitly take advantage of 64-bit integers (besides hand-tuned assembly)? Just by recompiling to 64-bit you are giving the compiler the opportunity to produce better code, that should be more then enough for virtually every application out there.
 
Um, did you read the first post?

Yep. It was about the "massive missed opportunity" of not combining the 64-bit transition with the assumed transition to a new screen sized next year. Nothing about 64-bit being "nothing more than marketing at the moment." In fact, it implies the opposite.
 
:confused:

1) Infinity Blade was upgraded to 64-bit in 2 hours by one person.
2) Not sure why developers would prefer to go through multiple unrelated transitions at one time.

Infinity Blade was recompiled to 64-bit in 2 hours. That is not the same thing as optimizing for 64-bit.

I highly doubt that the guy didn't have a team of apple employees behind him explaining how to get the recompile done quickly. I also doubt that this 64bit recompile was done anywhere else other than apple hq. This was a very important demo for apple that needed to be flawless and had millions of dollars at stake. How much of Infinity blade was converted one level the whole game etc .. it will take time to know exactly how much of a PITA 64bit will be or not
 
I highly doubt that the guy didn't have a team of apple employees behind him explaining how to get the recompile done quickly. I also doubt that this 64bit recompile was done anywhere else other than apple hq. This was a very important demo for apple that needed to be flawless and had millions of dollars at stake. How much of Infinity blade was converted one level the whole game etc .. it will take time to know exactly how much of a PITA 64bit will be or not

Yes, I can visualise the team of apple employees sitting behind him and telling 'look, now you have to press the compile button! well done! oh, the compiler gives you a warning! what might that be? you are casting an integer to a pointer, that is not good? now what do we do in this case?' :D:D:D Thanks, that was hilarious.
 
Yes, I can visualise the team of apple employees sitting behind him and telling 'look, now you have to press the compile button! well done! oh, the compiler gives you a warning! what might that be? you are casting an integer to a pointer, that is not good? now what do we do in this case?' :D:D:D Thanks, that was hilarious.

You've obviously never done any game development. There was certainly a lot of work to be done to get the app to even compile in 64-bit. Sure it didn't take long to compile the app itself but Apple didn't say how many man hours it took to prep the code.
 
You've obviously never done any game development. There was certainly a lot of work to be done to get the app to even compile in 64-bit. Sure it didn't take long to compile the app itself but Apple didn't say how many man hours it took to prep the code.

The guy from Infinity Blade said it took two hours by himself.
 
Actualy they have to even if they don't want to. Apple is mandating that all submitted apps be 32 and 64-bit compatible for now on.



there is a distinct difference between "permitted" and "mandating".


according to macrumors developers are now being permitted to submit apps in 64 bit.


https://forums.macrumors.com/threads/1637333/


can i ask where you got your information from?
 
What registers are you accessing directly in your code? And what data structures do you have that are working with 64-bit? Yes, some of the framework may take advantage of 64-bit but it is a far cry from optimizing for it.

Modern compilers include an optimizer, which is designed to optimize code for the platform being built. That means a current 32 bit app will only utilize optimizations for the A6 and below. An app built with the new 64-bit compiler will use the new registers to unroll loops and use the processors new instruction set to improve performance.

It will most likely be imperceptible for most apps because they already run smoothly on older hardware. But for say, an image processing app it may be noticeable as you are doing repeated operations on a large chunk of data.
 
Yep. It was about the "massive missed opportunity" of not combining the 64-bit transition with the assumed transition to a new screen sized next year. Nothing about 64-bit being "nothing more than marketing at the moment." In fact, it implies the opposite.

Huh? His post said the real value is X (tying 64-bit to new hardware) but they did not do that. So they did it for a reason without the new hardware... which is?

Marketing.
 
You've obviously never done any game development. There was certainly a lot of work to be done to get the app to even compile in 64-bit. Sure it didn't take long to compile the app itself but Apple didn't say how many man hours it took to prep the code.

Again - what are your basis for this claim and have you read the Apple iOS 64-bit transition guide? Do you understand what the main differences between 32- and 64-bit program are? I would bet that the Infinity Blade was simply coded in a clean manner - which makes a 64-bit port trivial.
 
Modern compilers include an optimizer, which is designed to optimize code for the platform being built. That means a current 32 bit app will only utilize optimizations for the A6 and below. An app built with the new 64-bit compiler will use the new registers to unroll loops and use the processors new instruction set to improve performance.

It will most likely be imperceptible for most apps because they already run smoothly on older hardware. But for say, an image processing app it may be noticeable as you are doing repeated operations on a large chunk of data.

Have you read Apple's guidance to developers on moving to 64-bit? They clearly state your application will use more memory, can perform slower, and consume more battery if not optimized.
 
Huh? His post said the real value is X (tying 64-bit to new hardware) but they did not do that. So they did it for a reason without the new hardware... which is?

Marketing.

Maybe if you ignore all the actual words he used.
 
Have you read Apple's guidance to developers on moving to 64-bit? They clearly state your application will use more memory, can perform slower, and consume more battery if not optimized.

Have you read the post you responded to?
 
Have you read Apple's guidance to developers on moving to 64-bit? They clearly state your application will use more memory, can perform slower, and consume more battery if not optimized.

No, it just states that it will be slower if you use messy code. All things they write there apply to the 32-bit code in the same way they apply to the 64-bit code. The only difference is that pointers are twice as large with 64-bit code, so the impact from bad code can be more significant. If you write code which does not already follow those guidelines (this includes the 'how to make your code 64-bit clean' part), then you should get back to the classroom. The only really tricky bit is the alignment of structs - which can indeed lead to annoying and difficult to debug situations. But situations like these can be also easily avoided by designing your code with foresight.

----------

I did, and I responded by saying recompiling in Xcode does not optimize. What value are you trying to add or point are you trying to make?

Ok, let me ask you a direct question - did you ever do any actual serious programming in your life? Because what you say here is simply beyond ridiculous. The compiler Xcode uses is clang - which is open-source - now go look how it works and tell us to which extent its 'not optimising'. Really, this is infuriating :mad:

----------

So what benefit do consumers get from 64-bit? I don't play Infinity blade

Well, mostly none, actually :) You can get performance improvements on the same code (and some algorithms will actually see a significant increase) at the slight expense of RAM usage. Its not that far from how it works with desktop software. Although, the 64-bit instruction set is supposed to be quite different from the 32-bit one, so there might be some additional performance benefit there. I don't know much about ARM assembly so I can't comment on that.
 
No, it just states that it will be slower if you use messy code. All things they write there apply to the 32-bit code in the same way they apply to the 64-bit code. The only difference is that pointers are twice as large with 64-bit code, so the impact from bad code can be more significant. If you write code which does not already follow those guidelines (this includes the 'how to make your code 64-bit clean' part), then you should get back to the classroom. The only really tricky bit is the alignment of structs - which can indeed lead to annoying and difficult to debug situations. But situations like these can be also easily avoided by designing your code with foresight.


That is NOT what it says at all. Even if you interpret it that way (which is 100% wrong) are you suggesting that of the 900k+ apps they are all written to perfection?

This is the difference between academic and reality.

Ok, let me ask you a direct question - did you ever do any actual serious programming in your life? Because what you say here is simply beyond ridiculous. The compiler Xcode uses is clang - which is open-source - now go look how it works and tell us to which extent its 'not optimising'. Really, this is infuriating :mad:


Wow... Xcode is an IDE that includes a compiler. Just wow...
 
That is NOT what it says at all. Even if you interpret it that way (which is 100% wrong) are you suggesting that of the 900k+ apps they are all written to perfection?

This is the difference between academic and reality.

I never said that all 900k+ apps are 'written to perfection'. I said there is a difference between sloppy work and decent work. If you have been doing sloppy work, well... you have no one but yourself to blame for it ;)


Wow... Xcode is an IDE that includes a compiler. Just wow...

Incidentally, it is and IDE and it does include a compiler. At least you are starting to catch up here :p So what are you trying to say? We are still talking about your nonsensical claim that 'recompiling does not optimise'.
 
I never said that all 900k+ apps are 'written to perfection'. I said there is a difference between sloppy work and decent work. If you have been doing sloppy work, well... you have no one but yourself to blame for it ;).

Incidentally, it is and IDE and it does include a compiler. At least you are starting to catch up here :p So what are you trying to say? We are still talking about your nonsensical claim that 'recompiling does not optimise'.

Childish insults are a sign of a weak argument. And yes, recompiling will not optimize for 64-bit. You know full well to optimize most of the apps will need new code.
 
I love how people complain that "oh apple wouldnt make developers do this" or "developers wouldnt be forced to change blah blah" After talking with a developer about his company Ive realized that at this point, developers need apple wayyy more than apple needs developers. Apple could carry 5 different sizes of the iphone and developers would have to change.

plus, its their JOB. Thatd be like saying "oh we should never develop new ways to perform bypass surgery so doctors wouldnt have to learn new procedures"
 
Childish insults are a sign of a weak argument. And yes, recompiling will not optimize for 64-bit. You know full well to optimize most of the apps will need new code.

I am sorry if I insulted you. It wasn't my intention. Its just rather clear to me that you have absolutely no clue about how compilers work or what difference between a 32 or 64 bit CPU is. And I find it very... well, weird that - despite your obvious lack of education on the topic - you try to a argue in this thread, misleading people who maybe try to learn something from reading the posts here. Anyway, let me give you a brief explanation.

There are two differences which are vital here: the 64 bit CPU has more registers (very fast processor internal storage) and it can do computation on 64bit integers in one go (this is of no significance for most applications because they simply don't need it). In addition, the 64bit has some additional instructions which might make some things faster, but we will disregard it here.

Let us, again, for the sake of the argument, assume that the 32 bit CPU has 2 registers (R1 and R2) while the 64-bit CPU has 4 registers (R1, R2, R3, R4). The actual number of registers is of course much higher, but the idea is the same. Now let us assume you have the following code:

x = b*sin a + c*cos a
y = e*sin a + d*cos a

Now, the compiler must translate it into machine code. Let us also assume that trigonometric operations are expensive (might or might not be true on current architectures). Compilers are smart enough to detect this and the first optimisation step will be to reduce the number of such operations. I.e., the compiler will cache the result, creating an intermediate code like this:

f = sin a
g = cos a
x = b*f + c*g
y = e*f + d*g

Until here the optimisation is the same for 32 and 64 bit compiler. Now lets look which instructions the 32 bit compiler will produce. In following I assume that operations I write here can be performed by one instruction and each instruction must operate on at least one register.

We start with:

Code:
R1 = a
R0 = SIN R1
R1 = COS R1
Now we have a problem - we have stored the sin and cos in the two available registers, but we are out of the registers for the remaining stuff! E.g. we could do something like this:

Code:
R0 = R0*b
R1 = R1*c
R0 = R0 + R1
x = R0

but then we lose the cached results of the sin und cos (which were stored in R0 and R1) - and we must compute them anew for y. Another possible strategy would be to create new dummy variables (stored in RAM) sina and coda which hold sin a and cos a respectively instead of using the registers for it. Either way, we need additional trigonometrical instructions or additional memory.

A possible machine code would be though

Code:
R1 = a
R0 = SIN R1
R1 = COS R1 
sina = R0
cosa = R1
# reuse the fact that R0 is sin and R1 is cos
R0 = R0*b
R1 = R1*c
R0 = R0 + R1
x = R0
# load sin and cos back to R0, R1
R0 = sina
R1 = cosa
R0 = R0*e
R1 = R1*d
R0 = R0 + R1
y = R0

in sum, we have 7 RAM load operations, 4 RAM store operations, 2 trigonometric operations and 6 arithmetic operations


Now, the 64-bit instruction set has two additional registers. So we can easily bypass the problem above:

Code:
R1 = a
R0 = SIN R1
R1 = COS R1 
R2 = R0*b
R3 = R1*c
R2 = R2 + R3
x = R2
R2 = R0*e
R3 = R1*d
R2 = R2 + R3
y = R2

Here we have 5 RAM load operations, 2 RAM store operations, 2 trigonometric operations and 6 arithmetic operations.

As you can see, simply compiling to the 64-bit instruction set allowed us to eliminate 40% of expensive RAM access operations. So the appellation will potentially run faster when compiled to 64-bit.

Got it now?

In truth, the compiler will be even smarter, by putting the variables into SIMD registers and executing parallel instructions on them, but let's not go there now...
 
I am sorry if I insulted you. It wasn't my intention. Its just rather clear to me that you have absolutely no clue about how compilers work or what difference between a 32 or 64 bit CPU is. And I find it very... well, weird that - despite your obvious lack of education on the topic - you try to a argue in this thread, misleading people who maybe try to learn something from reading the posts here. Anyway, let me give you a brief explanation.

...

As you can see, simply compiling to the 64-bit instruction set allowed us to eliminate 40% of expensive RAM access operations. So the appellation will potentially run faster when compiled to 64-bit.

Got it now?

In truth, the compiler will be even smarter, by putting the variables into SIMD registers and executing parallel instructions on them, but let's not go there now...

Ok, I almost choked reading this. First, understand the number of registers has nothing to do with 32-bit vs 64-bit. So your examples show the benefits of an architecture with more registers, which a compiler can optimize even a 32-bit application for.

So unless Apple is purposely gimping their compiler I can gain the same benefit of more registers without 64-bit.
 
The guy from Infinity Blade said it took two hours by himself.
Sure. But I'm sure they spent months getting the game ready for 64 bit.

----------

Again - what are your basis for this claim and have you read the Apple iOS 64-bit transition guide? Do you understand what the main differences between 32- and 64-bit program are? I would bet that the Infinity Blade was simply coded in a clean manner - which makes a 64-bit port trivial.

There's really no "clean manner" to develop a game for both systems that easily. Otherwise you would end up with a highly inefficient game.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.