• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
64 bit transition indecisitons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

64 bit transition indecisitons


  • Subject: 64 bit transition indecisitons
  • From: Eyal Redler <email@hidden>
  • Date: Sat, 23 Nov 2013 20:28:40 +0200

I'm currently in the process of moving a rather larger Cocoa code base to 64bit.

Turning on 64 bit and compiling produced, of course, many many errors mostly due to the fact that in the code I mixed freely unsigned short, unsigned int and unsigned. (To my defence, this code base has its roots in the pre NSInteger days) so I've decided to use this opportunity to review all these uses and unify my approach.

Problem is, I'm having a hard time deciding what approach to take with this.

First problem is instance variables and structs. Most of my app mem use is many instances of small objects or c arrays of rather small structs. I wouldn't want to inflate my memory use that much but I'm worried about penalties in accessing 32 bit integers inside structs. I also feel really strange using NSUInteger for things for which even a 32 bit integer is too much.

Another issue is local variables, here I assume it won't hurt to change all unsigned int, unsigned long or unsigned to NSUInteger but I'm not sure its worth the bother. Does using the native integer bring any advantages?

Any thoughts and opinions about this would be most appreciated.

Eyal Redler


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: 64 bit transition indecisitons
      • From: Rich Siegel <email@hidden>
  • Prev by Date: Can't Restore Snapshots in Xcode 5.0.2
  • Next by Date: Re: 64 bit transition indecisitons
  • Previous by thread: Can't Restore Snapshots in Xcode 5.0.2
  • Next by thread: Re: 64 bit transition indecisitons
  • Index(es):
    • Date
    • Thread