On Sun, Jun 27, 2010 at 10:59 PM, j-g-faustus
<johannes.fries...@gmail.com>wrote:

> Whatever JVM flag tweaks can be done for Clojure can be done for Java
> too, and I'm primarily interested in relative performance, which I
> suppose is roughly the same as long as I use the same flags for both.
>

That's not exactly true. Clojure emits code that is made to be as fast as
possible once hot using the right jvm.
(At least it was like that last time I checked.)
Maybe someone that knows better the inside of the compiler could give a set
of relevant options that helps for
Clojure performance.
One of the best example of that I know of is the aget in clojure. Last time
I checked, it did not get compiled to the bytecode to access
an array but to a static method in the runtime that access the array.
A "good" jvm inlines small static method. And so the access become as fast
as java. But if the jvm is bad, it will affect clojure far more than
java, because clojure relies more in the jvm (and rightly so, jvms are very
good).

If what I say is still true (and I don't know the internals of clojure well
enough to be sure), it is counter productive to optimize on a "bad" jvm:
 you could introduce some costs trying to remove some "fake" costs.

("good"/"bad" is not the right terminology, it is a shorthand for "a jvm for
which Clojure is/is not optimised". Apologies if I have hurt a jvm's
feelings.).
Nicolas.

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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