Jump to content

  • Log In with Google      Sign In   
  • Create Account


32 bit or 64 bit


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
9 replies to this topic

#1 ms75214   Members   -  Reputation: 143

Like
1Likes
Like

Posted 15 July 2012 - 12:04 PM

i'm making a game for the mac app store.


is it smarter to make it 32 bit or 64 bit?

Sponsor:

#2 Bacterius   Crossbones+   -  Reputation: 8188

Like
6Likes
Like

Posted 15 July 2012 - 12:30 PM

How about... both?

The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#3 rnlf   Members   -  Reputation: 1110

Like
1Likes
Like

Posted 15 July 2012 - 11:42 PM

Since you can put both versions into the same package, yes: make both.

my blog (German)


#4 6677   Members   -  Reputation: 1058

Like
0Likes
Like

Posted 17 July 2012 - 04:16 AM

Aren't most macs 64 bit capable anyway. Failing that a 32 bit package will run on 64 bit OSx anyway.

#5 Phlipp   Members   -  Reputation: 128

Like
0Likes
Like

Posted 17 July 2012 - 06:04 AM

Does a 32 bit OS process code with 64 bit numbers (long, ulong) properly? I was under the impression that if you use 64bit operators, you need to run it on a 64bit OS.

#6 Hodgman   Moderators   -  Reputation: 27908

Like
0Likes
Like

Posted 17 July 2012 - 06:28 AM

Does a 32 bit OS process code with 64 bit numbers (long, ulong) properly? I was under the impression that if you use 64bit operators, you need to run it on a 64bit OS.

Depends on the CPU architecture that your compiler is targeting. Regular, portable x86 code won't have the instructions/registers to do 64-bit ops in a single instruction; the compiler will have to use a few instructions to implement long long operations.

#7 Tribad   Members   -  Reputation: 812

Like
0Likes
Like

Posted 17 July 2012 - 07:09 AM

But there is a new ABI coming up that uses the 64-Bit extensions on 32-Bit code.
If you need the 64-Bit data size for a special purpose so you are bound to use them you can use the types from stdint.h
They are fixed in size across different environments. This way you need not to know how long or long long is realized within the used environment.
stdint.h is not part of the MS compilers. But there are some versions around in the net that work with MS.

#8 samoth   Crossbones+   -  Reputation: 4528

Like
0Likes
Like

Posted 17 July 2012 - 08:53 AM

But there is a new ABI coming up that uses the 64-Bit extensions on 32-Bit code.

That's Linux though, and still experimental / half finished.

As for "32 or 64 bit", my opinion is that if you have to ask, then you can just stick with 32 bit. 64 bit operating systems allow running 32 bit code just fine. A few rare operations might be slightly more expensive, but pointers are only half the size (which makes a big difference).
If you do need 64 bits, then you already know (you've already run out of address space once), you need not ask.

You really only need 64 bit if you have a dataset of considerably more than a gigabyte or two that you wish to keep in memory (mapped or otherwise). Most programs work just fine with a "normal" 2GB address space (which can be 4GB at no extra cost under a 64 bit OS if you only set the appropriate flag in the executable).

Edited by samoth, 17 July 2012 - 08:54 AM.


#9 6677   Members   -  Reputation: 1058

Like
1Likes
Like

Posted 18 July 2012 - 04:57 PM

Guys, this is a mac application though, from what I can find there aren't any macs running OSX as 32 bit anymore apart from the old PowerPC models

Edited by 6677, 18 July 2012 - 04:58 PM.


#10 Bacterius   Crossbones+   -  Reputation: 8188

Like
0Likes
Like

Posted 18 July 2012 - 05:27 PM

Guys, this is a mac application though, from what I can find there aren't any macs running OSX as 32 bit anymore apart from the old PowerPC models

Still, with the proper portability conventions followed, producing both versions should be effortless and would allow the application to run on those old PowerPC models too Posted Image

Of course, if applying those conventions would take a rewrite, it's probably not worth the time Posted Image so good point. +1

The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS