• 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: copy and mutableCopy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: copy and mutableCopy


  • Subject: Re: copy and mutableCopy
  • From: ChanMaxthon <email@hidden>
  • Date: Mon, 28 Apr 2014 01:06:23 +0800

I am not sure if Apple libraries COW but I know GNUstep uses COW on their NSData, NSDictionary and NSArray (and that and a different NSObject layout in their implementation of some classes are the reason why their libraries are faster than Apple's)

Simplest way is to copy NSData sand watch for calls to memcpy(3) and values of -bytes.

Sent from my iPhone

> On Apr 28, 2014, at 12:54 AM, Jens Alfke <email@hidden> wrote:
>
>
>> On Apr 27, 2014, at 4:06 AM, Maxthon Chan <email@hidden> wrote:
>>
>> Immutables copied are just retained and returned, and mutableCopied are COW.
>> Mutables copied generates COW.
>
> Hmm. Got any proof of the copy-on-write behavior? I’ve never heard of that being implemented in CF/Foundation classes.
>
>> That would be the fastest way implementing that.
>
> The “would” makes it sound as though you’re just speculating. If you are, please make that more clear.
>
> —Jens
_______________________________________________

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: copy and mutableCopy
      • From: Jens Alfke <email@hidden>
References: 
 >copy and mutableCopy (From: Dave <email@hidden>)
 >Re: copy and mutableCopy (From: John McCall <email@hidden>)
 >Re: copy and mutableCopy (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: copy and mutableCopy
  • Next by Date: Re: SpriteKit junk
  • Previous by thread: Re: copy and mutableCopy
  • Next by thread: Re: copy and mutableCopy
  • Index(es):
    • Date
    • Thread