Sorry, Wagner, I'm a little spaced -- I didn't realize your test included getting the contents into an array! This is great.
Here are some VERY interesting results. The simulator seems to be faster with bin and text, while the device is quite a bit slower with text, and about even with bin and xml. *From simulator:* bin 0.206031, 0.231285 xml 0.479002, 0.433691 txt 0.296232, 0.213713 *From device:* bin 5.760234, 5.628642, 6.457935, 5.068025 xml 5.651398, 5.428460, 5.525060, 5.096705 txt 8.951027, 8.817826, 8.784503, 8.539374 Thanks again, Wagner! I guess I'll see how it goes with plist. On Tue, Apr 14, 2009 at 4:43 PM, Kyle Sluder <kyle.slu...@gmail.com> wrote: > On Tue, Apr 14, 2009 at 7:23 PM, Miles <vardpeng...@gmail.com> wrote: > > *1) *I've been trying Kyle's suggestion for a few hours and I can't get > it > > working right. I broke it into this simple example, and it's not able to > > convert it to the 'word' struct. > > At this point, better solutions that involve less hackery have been > proposed. I'd suggest ignoring mine unless you really *really* need a > speed improvement over something like WT's plist solution. You > probably won't, and the only way you'll know you do is with > Shark/Instruments profiling data. > > Nonetheless: > > > NSMutableData *data1; > > NSString *myString = @"\\x06hello\\x00"; > > Those \xNN were supposed to represent literal bytes. :) Typically, > when you see someone trying to put raw binary data in an email/blog > post, they will use the \xNN convention, because there's no other > convenient way to illustrate "this is an actual number 6, *not* the > ASCII character for 6". > > --Kyle Sluder > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com