Re: ObjC 3D engine
Re: ObjC 3D engine
- Subject: Re: ObjC 3D engine
- From: Uli Kusterer <email@hidden>
- Date: Mon, 25 Jun 2007 23:45:21 +0200
On 25.06.2007, at 18:59, Kaelin Colclasure wrote:
Second, if you *must* use C++ keep it isolated into dedicated (and
hopefully small), performance-critical modules -- ideally that are
compiled as a separate target from the bulk of your project. I
recommend against falling into the practice of using ObjC++ for all
of your sources. Your compilation times suffer, and more
insidiously the incompatibility between ObjC and C++ exceptions
makes it extremely tricky to use either safely.
I can definitely attest to that. You don't want to run the ObjC++
compiler on even one more file than you need to.
Personally, I'd create a Cocoa wrapper class that looks like
NSArray from the outside and uses STL only on the inside. Or even
better, just write your own code with an NSMutableData block as the
backing store for a C array. Or just malloc a block, whatever floats
your boat, man. If you're really only using std::vector, that should
give you about the same performance if you know any algorithm basics.
The only types where it would be worthwhile are std::map and a few
other of the more complex STL types.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
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