Toby DiPasquale on 21 Nov 2007 22:13:33 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Android Forums


On Wed, Nov 21, 2007 at 02:05:48PM -0500, Matthew Rosewarne wrote:
> Actually, to port a C++ (Qt in particular) program to a new platform, the same 
> amount of work has to be done as a Java program, except for the added 
> recompilation.  

Wow, Qt must be magical indeed. I guess that's why so many developers
aren't using it... especially on mobile phones, where it could really
help. Gimme a break.

> Java has advanced considerably since its early days.  The code that that VM 
> generates is at least as good as that of GCC.  The overhead comes not from 
> running that compiled code, but from the fact that it has to be compiled at 
> runtime.  It's easy to make a benchmark that shows Java to be as fast as C, 
> so long as you ignore the additional resources it takes to JIT compile.  It's 
> easy to demonstrate simply by comparing the difference in resource use 
> between a Java program compiled to machine code with GCJ and the same Java 
> program JIT compiled with GIJ.  The two methods use the same compiler, but 
> since the former is pre-compiled, the real-world resource & speed benefits 
> are significant.

Apparently you weren't listening: the difference is slight even with the
JIT overhead. Got it? Its not a "significant" difference anymore. This is
why C++ loses: way more complex and shitty with just a teensy bit of extra
performance in a few domains. 

-- 
Toby DiPasquale
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug