• 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
Re: NSInteger vs int vs int32_t
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSInteger vs int vs int32_t


  • Subject: Re: NSInteger vs int vs int32_t
  • From: Kyle Sluder <email@hidden>
  • Date: Mon, 02 Jul 2012 16:34:48 -0700

On Jul 2, 2012, at 4:32 PM, Jens Alfke wrote:

>
> On Jul 2, 2012, at 4:17 PM, Kyle Sluder wrote:
>
>>> It depends. 64-bit values are twice as big as 32-bit ones, so they use up twice as much L2 cache and RAM.
>>
>> I would be surprised if cache is managed at anything other than multiples of register width (64 bits).
>
> That's not the point. Data containing 64-bit values (in objects, structs, stack frames…) is obviously bigger than data containing smaller values.

Not necessarily. The CPU could just mask off the top 32 bits when executing 32-bit opcodes on in-cache data. Each 32-bit value is still taking up 64 bits of cache space. That's probably a lot easier and more efficient than making it possible to address arbitrary 32-bit slices of cache.

Note that I'm only referring to cache here, not RAM.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: NSInteger vs int vs int32_t
      • From: Scott Ribe <email@hidden>
    • Re: NSInteger vs int vs int32_t
      • From: David Duncan <email@hidden>
    • Re: NSInteger vs int vs int32_t
      • From: Jens Alfke <email@hidden>
References: 
 >NSInteger vs int vs int32_t (From: Andreas Grosam <email@hidden>)
 >Re: NSInteger vs int vs int32_t (From: Jens Alfke <email@hidden>)
 >Re: NSInteger vs int vs int32_t (From: Chris Hanson <email@hidden>)
 >Re: NSInteger vs int vs int32_t (From: Charles Srstka <email@hidden>)
 >Re: NSInteger vs int vs int32_t (From: Jens Alfke <email@hidden>)
 >Re: NSInteger vs int vs int32_t (From: Kyle Sluder <email@hidden>)
 >Re: NSInteger vs int vs int32_t (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: NSInteger vs int vs int32_t
  • Next by Date: Re: NSInteger vs int vs int32_t
  • Previous by thread: Re: NSInteger vs int vs int32_t
  • Next by thread: Re: NSInteger vs int vs int32_t
  • Index(es):
    • Date
    • Thread