• 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: performance of encoding an array of structs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: performance of encoding an array of structs


  • Subject: Re: performance of encoding an array of structs
  • From: "stephen joseph butler" <email@hidden>
  • Date: Tue, 12 Jun 2007 13:23:35 -0500

On 6/12/07, Dorian J <email@hidden> wrote:
Basically, when you encode an NSArray, it puts it into a plist. Since
you're using a c array, use an +[NSData dataWithBytesNoCopy:length:
] using _buffer and sizeof(MVTimedPoint) * _bufferSize as length and
store the resulting NSData. Then you can load the NSData straight
into your buffer when decoding. No converting to strings or plists,
just raw data. That should be a few orders of magnitude quicker.

Only do this if you don't care about clients running on an opposite architecture. Your data won't load properly from Intel -> PPC, or PPC -> Intel. _______________________________________________

Cocoa-dev mailing list (email@hidden)

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: performance of encoding an array of structs
      • From: Dorian Johnson <email@hidden>
References: 
 >performance of encoding an array of structs (From: Hank Heijink <email@hidden>)
 >Re: performance of encoding an array of structs (From: Dorian J <email@hidden>)

  • Prev by Date: Re: performance of encoding an array of structs
  • Next by Date: Re: performance of encoding an array of structs
  • Previous by thread: Re: performance of encoding an array of structs
  • Next by thread: Re: performance of encoding an array of structs
  • Index(es):
    • Date
    • Thread