Re: The cost of using objects rather than plain C variables
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