On Jan 13, 10:07 am, cliffc <cli...@acm.org> wrote:
> Some comments:
>
> 1- If you think that HotSpot/Java is slower than C++ by any
> interesting amount, I'd love to see the test case.  Being the
> architect of HotSpot "-server" I've a keen interest in where
> performance isn't on par with C.  

-snip-

> 5- The debianshootoutresults generally badly mis-represent Java.
> Most of them have runtimes that are too small (<10sec) to show off the
> JIT,

When you say most of the runtimes are <10sec I wonder what exactly you
are looking at - on u32 & u64, 6 of 13 are <10sec (on quadcore u32q &
u64q,  8 of 13 are <10sec).

I'm always puzzled when I read something like " have runtimes that are
too small (<10sec)" because in my innocence it seems as though JIT
gets to do a lot more in 10 sec on Q6600 than it did on Pentium 4 - am
I just wrong about that?

The benchmarks game has never aimed "to show off the JIT" anymore than
it's aimed "to show off C++" but -

http://shootout.alioth.debian.org/gp4/miscfile.php?file=dynamic&title=Java%20Dynamic%20Compilation


> and generally don't use any of the features which commonly appear
> in large Java programs (heavy use of virtuals, deep class hierarchies,
> etc) for which the JIT does a lot of optimization.

I think that has to be right although it seems like similar issues
would apply to all the other programming languages, not just Java.

"your application is the ultimate benchmark"

http://shootout.alioth.debian.org/u32/miscfile.php?file=benchmarking&title=Flawed%20Benchmarks#app


> I give a public talk on the dangers of microbenchmarks and all the
> harnesses I've looked at in theshootoutfail basic sanity checks.
> Example: the fannkuch benchmark runs 5 secs in Java, somewhat faster
> in C++.  Why does anybody care about a program which runs 5sec?

Why does anybody care that a program runs 4sec rather than 6sec? (otoh
those programs which run 10 minutes...)

Of course you could choose other examples from the benchmarks game
which show a Java program only a few tenths of a second from the
fastest C++ program. (The reaction I frequently see is surprise that
Java can be that close to C++).


> (there's other worse problems: e.g. the C++ code gets explicit constant
> array sizes hand-optimized via templates; the equivalent Java
> optimization isn't done but is trivial (declare 'n' as a *final* static var)
> and doing so greatly speeds up Java, etc).

Which is to say that some of the programs are better than some of the
other programs - isn't that always going to be the case?

It's not obvious which Java fannkuch program you're talking about - my
guess would be "Java 6 -server" rather than "Java 6 -server #2" or
"Java 6 -server #4" (both of which seem to declare 'n' final but don't
use all the cores) ?





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to