"Unfortunately, Java's designers didn't seem to value CPU time at all.
The language has a nasty reputation for sluggish interfaces, and its
execution speed drags well behind C++'s. Pointer aliasing or not we
are many generations of optimisers away from languages such as Java
overtaking C++ so if you need fast code C/C++ is the obvious choice."
article here:
http://slidetocode.com/2012/04/14/objective-c/
discussion here:
http://news.ycombinator.com/item?id=3840861
I posted another comment. For your reference, it's below.
"Unfortunately, Java's designers didn't seem to value CPU time at all. "
Well, it's obvious that people think of (Apple) fanboism when they read
such misinformation; apart from the fact that there's no point in writing
such statements without citing some numbers or real cases.
I can tell you that I've written my last line of C++ exactly ten years
ago. In these ten years I've designed and implemented a good deal of
industrial software in different segments and never experienced
performance problems. Already in 2004, which is ages ago, I designed and
implemented a near real time system for distributing telemetry data in F1
racing - among others, Renault won two championships running that system.
It was Java 1.4 and it worked pretty well. The specs were pretty
demanding. I recall people wondering whether Java was up to the requisites
(at the time it was a reasonable doubt, not today).
I am just lucky as I can mention a publicly known project, but there are
tons of people around who daily experience excellent performance with Java
and don't feel any desire to go back to C/C++. You'd just attend a couple
of Java conferences (or at least read the slides) before publishing
uninformed statements.
--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
fabrizio...@tidalwave.it
http://tidalwave.it - http://fabriziogiudici.it
--
You received this message because you are subscribed to the Google Groups "The Java Posse" group.
To post to this group, send email to java...@googlegroups.com.
To unsubscribe from this group, send email to javaposse+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
> Isn't it really quite simple: Managed and non-managed languages make
> different fundamental trade-offs, opting for either performance or
> productivity when these are in tension.
>
> Empirical evidence suggests t's easier to develop an Android application,
> but harder to make it feel fast. While it's harder to develop an iOS
> application, it's easier to make it feel fast. In other words, it's rare
> (if ever) you hear of an implementation of an app that feels snappier on
> Android than on iOS - even if iOS hardware is often inferior.
Apart from the fact that the success of an application is a mix of
qualities, including stability (a fast crasher is useless), thus I find
normal to eventually trade off a bit of CPU for stability, the fact that
we need a trade off with Android today might be due to the fact that
Dalvik is relatively new and we know that VMs needs years to be optimized.
Probably in a few years Dalvik will be so optimized that we won't tell the
difference.
In any case, I don't own any iOS device, anyway my Asus Transformer (1st
version) is always perfectly snappy.
On Apr 15, 2012 9:28 PM, "Casper Bang" <caspe...@gmail.com> wrote:
>
> Isn't it really quite simple: Managed and non-managed languages make different fundamental trade-offs, opting for either performance or productivity when these are in tension.
>
Even that isn't strictly true. There are two notable areas where a managed language will offer better performance:
1. Heavy churn of memory usage. Bumping a heap pointer is significantly faster than malloc/free. Yes, you can duplicate this in a non-managed language using e.g. placement new in C++. You're basically just making your language a little bit more managed to achieve this though, and it's remarkably easy to royally screw it up when you do so.
2. A managed language will optimise jit compilation based on runtime metrics. These will change based on runtime data, and the framework can even make a speculative (but beneficial) optimisation, then revert if it turns out to be inappropriate. A statically compiled language simply doesn't have this opportunity available.
> Empirical evidence suggests t's easier to develop an Android application, but harder to make it feel fast. While it's harder to develop an iOS application, it's easier to make it feel fast. In other words, it's rare (if ever) you hear of an implementation of an app that feels snappier on Android than on iOS - even if iOS hardware is often inferior.
>
> /Casper
>
> On Saturday, April 14, 2012 10:13:53 PM UTC+2, phil swenson wrote:
>>
>> This guy claims:
>>
>> "Unfortunately, Java's designers didn't seem to value CPU time at all.
>> The language has a nasty reputation for sluggish interfaces, and its
>> execution speed drags well behind C++'s. Pointer aliasing or not we
>> are many generations of optimisers away from languages such as Java
>> overtaking C++ so if you need fast code C/C++ is the obvious choice."
>>
>> article here:
>> http://slidetocode.com/2012/04/14/objective-c/
>>
>> discussion here:
>> http://news.ycombinator.com/item?id=3840861
>
> --
> You received this message because you are subscribed to the Google Groups "The Java Posse" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/javaposse/-/KFgl26W0VSAJ.
>
> To post to this group, send email to java...@googlegroups.com.
> To unsubscribe from this group, send email to javaposse+...@googlegroups.com.
> 2. A managed language will optimise jit compilation based on runtime
> metrics. These will change based on runtime data, and the framework can
> even make a speculative (but beneficial) optimisation, then revert if it
> turns out to be inappropriate. A statically compiled language simply
> doesn't have this opportunity available.
It's precisely this part that, as far as I understand, is still relatively
"young" in Dalvik. Can somebody point to a short existing document about
what kind of JIT optimizations are available for Dalvik in comparison to
OpenJDK?
1. Heavy churn of memory usage. Bumping a heap pointer is significantly faster than malloc/free. Yes, you can duplicate this in a non-managed language using e.g. placement new in C++. You're basically just making your language a little bit more managed to achieve this though, and it's remarkably easy to royally screw it up when you do so.
2. A managed language will optimise jit compilation based on runtime metrics. These will change based on runtime data, and the framework can even make a speculative (but beneficial) optimisation, then revert if it turns out to be inappropriate. A statically compiled language simply doesn't have this opportunity available.
> However, none of this really matters to a user who just notices that
> scrolling around the screen in a browser, PDF or ebook reader feels
> snappier on an iPad than on an Android tablet.
I presume I can go to a store and play a bit with an iPad, but does exist
some comparison online? I'm really having no problems in speed with the
Adobe PDF reader (it's a semi-disaster for quality when rendering photos,
but it's another story).
Being lucky enough to own an Android phone and then being issued with
an iPhone for work I find that one issue relating to apps has dwarfed
all others. Despite the fact that it has only a quarter of the number
of apps installed as the iPhone, I cannot install an app without first
deleting another, whilst the iPhone appears to have a limitless
capacity for accepting new apps. I've pretty much reached the point
where I don't want to delete any of the existing apps on the Android ,
so anything new goes on the iPhone.
--
You received this message because you are subscribed to the Google Groups "The Java Posse" group.
To post to this group, send email to java...@googlegroups.com.
To unsubscribe from this group, send email to javaposse+unsubscribe@googlegroups.com.