Physics, particularly, also gets a big speed up from a c implementation. <div><br></div><div>It's a pity you have to require android 2.3+ to be able to the NativeActivity; using that you could write your entire engine in c, and basically have one code base for iphone and android. :3 that would be pretty sweet.</div>
<div><br></div><div>~</div><div>Doug.<br><br><div class="gmail_quote">On Fri, Jan 28, 2011 at 6:33 AM, Dan Venkitachalam <span dir="ltr"><<a href="mailto:dan@expandingbrain.com">dan@expandingbrain.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><div class="gmail_quote">On Thu, Jan 27, 2011 at 6:09 AM, Saxon <span dir="ltr"><<a href="mailto:saxon@saxon.cx" target="_blank">saxon@saxon.cx</a>></span> wrote:</div>
</div><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="padding-left:10px;padding-right:10px;padding-top:15px" name="Compose message area">
<div><span style="font-family:Calibri">I've done a tiny amount of Android dev (in Java), so I'm
curious about the choice of C++. Does it perform significantly better, or is it
easier to integrate existing C++ libraries, or do you like C++ more, or
something else?</span></div>
<div><br></div></div></blockquote><div><br></div></div><div>The NDK page [1] has an overview of where to expect speed gains but it's really app dependent. Games stand to benefit from C++ more than your average app because they have compute heavy workloads.</div>
<div><br></div><div>In my own projects GPU speed has been the real performance bottleneck, so Java's probably a viable option. But unless you're doing something pathological you're unlikely to beat C++ for speed.</div>
<div><br></div><div>Personally, I have a love/hate relationship with C++. Mostly hate, so I'm not using it out of any fondness for the language. The main benefit is portability - being able to reuse a codebase across platforms. C++ interfaces with Objective C and Java equally well and has strong vendor support, which is important to me.</div>
<div><br></div><div>Integrating C++ libraries has its ups and downs. It's less work than porting to Java but the C++ support is sketchy in places, meaning you have to hack around a lot of restrictions. For example, exceptions and the STL were only introduced in the latest NDK. But they can't be used together yet, so you have to either choose libraries that don't use them or patch heavily. At least the situation's slowly improving.</div>
<div><br></div><div>[1] <a href="http://developer.android.com/sdk/ndk/overview.html" target="_blank">http://developer.android.com/sdk/ndk/overview.html</a> </div><div><br></div><div><br></div><div>Dan.</div><div><br></div>
</div>
<br>_______________________________________________<br>
PIGMI mailing list - <a href="http://pigmi.org/" target="_blank">http://pigmi.org/</a> - <a href="mailto:pigmi@pigmi.org">pigmi@pigmi.org</a><br>
Unsubscribe: <a href="http://lists.pigmi.org/listinfo.cgi/pigmi-pigmi.org" target="_blank">http://lists.pigmi.org/listinfo.cgi/pigmi-pigmi.org</a><br></blockquote></div><br></div>