Now, I don't spend a lot of time thinking about performance of one language
versus another, so I might be off base here, but wouldn't the important
first question be "is there enough of a difference to make it a
consideration for this application?" A variant form of the question might
be "will the user notice the difference between the two?"

Assume that one language is significantly slower than another, and the
product is written in that language. If the user is not reporting problems
with application responsiveness, I would say the answer to both questions
is "no". In other words, in that case you'd be contemplating a major Knuth
violation to change languages for the sake of performance.
Of course, there are many cases you could bring up where this would be
invalid, for example if you're contemplating an increase in the program's
capabilities or if there are other advantages to conversion, but in this
simple case it seems that conversion to the faster language would be added
risk for no gain.

The larger point I'm getting at is that it seems to me that the question of
raw performance of a language, even if there is a single comprehensive way
to gather that up, is so seldom interesting to the outcomes given today's
hardware and the demands of most applications that "Language L is faster
than Language Q" is just not an interesting question for most applications,
and for most developers there will be much more important factors to
consider.

Of course, I could be completely wrong on this, and of course if I am I'd
like very much to know about it so I can stop being wrong....



On Thu, Dec 1, 2011 at 6:35 AM, Carl Jokl <[email protected]> wrote:

> This is not any kind of flame bait thread.
>
> I am hoping to get some unbiased information on the relative
> performance difference between Java and Objective-C.
>
> More specifically using up to date versions of the Java 6 JRE and
> using an up to date GNUStep implementation of Objective-C both running
> on Linux.
>
> I can find quite a few articles with people comparing Java vs C++ but
> I suppose Objective-C is more niche and tends not to be used in
> comparisons.
>
> I know that the opinion still prevails in many circles that Java is
> slower and/or significantly slower than code written in C/C++. There
> have been articles more recently stating that Java was capable of
> outperforming C++ these days.
>
> I am cautious with benchmarks because obviously if someone is trying
> to prove a point, that person can be selective about using benchmarks
> which support their case.
>
> I know for example that Java has performance limits doing lots of
> heavy floating point operations or trigonometry due to not using
> native acceleration where it would cause the values to be less
> accurate than required by the specifications (Though I believe this
> was being addressed).
>
> That used case may only apply to applications that use a lot of
> floating point calculations. Many business web based or enterprise
> applications may do very little floating point number crunching.
>
> For the sake of context I am in a company that has a system where Java
> is used with Servlets to provide a web front end to a system the core
> of which is written in Objective-C running on GNUStep.
>
> Considering the dates in some of the Java source I know the system
> must have existed at least as long ago as the year 2000.
> Back then the versions of Java would have been a lot slower. Java 6
> included a big performance increase. It would have made sense back
> then to argue that the Objective-C code was going to probably perform
> better than Java. Now I don't think the difference would be as big. It
> would be within my margin of error that Java may outperform Objective-
> C due to compile time optimisation that can be done in Java that
> cannot be done in Objective-C that is more geared towards dynamic,
> runtime behaviour. In that case I would expect C++ to be faster than
> Objective-C generally speaking.
>
> I am hoping to get some feedback from the community to sanitise my
> assumptions here.
>
> I don't want to end up looking like an idiot if Objective-C
> significantly outperforms Java.
>
> The JNI overhead of having Java talk to Objective-C could cancel out
> or more than cancel out any performance gains in Objective-C if the
> difference is only slight. This depends also whether the cross
> communication comprises of many small JNI calls vs few calls that do a
> lot of processing before the call returns.
>
>  Any performance information / experience would be helpful.
>
> --
> You received this message because you are subscribed to the Google Groups
> "The Java Posse" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/javaposse?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to