• 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: The cost of using objects rather than plain C variables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The cost of using objects rather than plain C variables


  • Subject: Re: The cost of using objects rather than plain C variables
  • From: Vincent Habchi <email@hidden>
  • Date: Sun, 07 Jul 2013 18:38:59 +0200

Hi!

You’re right to point that CFtypes exist: I often overlook these and that’s stupid of me.

> Why? What's wrong with a simple array?

Nothing. Well, at first, I was looking for a self expanding array, given that I didn’t know the size beforehand.

> (Or, I would argue, though it's not a popular strategy, what's wrong with std::vector?)

Oh, just that since I moved from plain BSD/Qt3 to MacOS/Cocoa, I swore not to write any line of C++ ever again. But that’s just a personal commitment ;)

> Now if you really want speed, stop converting from text to floats, convert the file to a binary format containing floats before your users have to load it.

That’s what I plan for the next step: I’ll try to set up an automatic translation from the ascii file as part of the build process. But I must admit while I am pretty familiar with Makefiles, I have still to figure out how to do that with Xcode (I suppose it’s not a hard task, it’s just that I hadn’t time to slog on that).

Have a nice Sunday,
Vincent


_______________________________________________

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: The cost of using objects rather than plain C variables
      • From: Scott Ribe <email@hidden>
    • Re: The cost of using objects rather than plain C variables
      • From: Scott Ribe <email@hidden>
References: 
 >The cost of using objects rather than plain C variables (From: Vincent Habchi <email@hidden>)
 >Re: The cost of using objects rather than plain C variables (From: Ken Thomases <email@hidden>)
 >Re: The cost of using objects rather than plain C variables (From: Vincent Habchi <email@hidden>)
 >Re: The cost of using objects rather than plain C variables (From: Scott Ribe <email@hidden>)

  • Prev by Date: Re: The cost of using objects rather than plain C variables
  • Next by Date: Re: NSTextField / NSSecureTextField toggl
  • Previous by thread: Re: The cost of using objects rather than plain C variables
  • Next by thread: Re: The cost of using objects rather than plain C variables
  • Index(es):
    • Date
    • Thread