Thread
:
Meego vs Android apps (C or Java?)
View Single Post
v13
2011-02-08 , 13:22
Posts: 376 | Thanked: 511 times | Joined on Aug 2009 @ Greece
#
109
Originally Posted by
Radu
How can someone sane believe that compiled code can't do the same stuff that VM/JIT code does?
In theory you're right. In practice
you're wrong
.
What you say is true only under perfect conditions (like looking for a non-rating black hole). In practice much of a program's speed comes from the algorithms and code organization instead of small-things optimization. For example, in theory it would be faster if you used the assembly language but in practice this will result in slower code since you'll not implement common patterns as good as they are already implemented by any other language (or its libraries).
That's why it may be faster to write something in python using Qt bindings (or java) than write it in C++, since you'll take advantage of some very efficient data handling methods that you'll most probably won't implement yourself.
Of course there are many exception to the above (e.g. linux kernel), but when dealing with common program developers like ourselves, the above becomes mostly true.
However, there are other benefits in native code than the speed and that's where you should focus instead.
Quote & Reply
|
The Following 2 Users Say Thank You to v13 For This Useful Post:
Capt'n Corrupt
,
nicolai
v13
View Public Profile
Send a private message to v13
Visit v13's homepage!
Find all posts by v13