• 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: Reading in dictionary from txt file: options for speed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading in dictionary from txt file: options for speed


  • Subject: Re: Reading in dictionary from txt file: options for speed
  • From: Miles <email@hidden>
  • Date: Tue, 14 Apr 2009 17:48:38 -0700

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 <email@hidden> wrote:

> On Tue, Apr 14, 2009 at 7:23 PM, Miles <email@hidden> 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 (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: Reading in dictionary from txt file: options for speed
      • From: WT <email@hidden>
References: 
 >Reading in dictionary from txt file: options for speed (From: Miles <email@hidden>)
 >Re: Reading in dictionary from txt file: options for speed (From: Kyle Sluder <email@hidden>)
 >Re: Reading in dictionary from txt file: options for speed (From: Michael Ash <email@hidden>)
 >Re: Reading in dictionary from txt file: options for speed (From: Miles <email@hidden>)
 >Re: Reading in dictionary from txt file: options for speed (From: Kyle Sluder <email@hidden>)

  • Prev by Date: C: treated as a path component
  • Next by Date: Re: Reading in dictionary from txt file: options for speed
  • Previous by thread: Re: Reading in dictionary from txt file: options for speed
  • Next by thread: Re: Reading in dictionary from txt file: options for speed
  • Index(es):
    • Date
    • Thread