On 7/10/06, Peter Rodgers <[EMAIL PROTECTED]> wrote:
Good lord, what's wrong with Groovy? We're only six times slower in pure interpreted mode (with a LOT of overhead and cruft and few optimizations) and they're compiled to bytecode? That sounds like a serious issue to me. Perhaps your test did not cache groovy's compile results? That performance seems really, really bad.
The rhino and python numbers are extremely impressive. Assuming no glitch in your test, the fact that Groovy can't compete with those two doesn't bode well. If we can follow their lead we'll be in great shape. I'll have to study their compilers in more detail.
I have mentioned issues before with pre-parsing, but we have a few potential solutions. We are also likely to create, in the short-term, a partially-compiled version of the AST to speed interpretation. Both the fixed preparsed AST and the partially-compiled AST will be cacheable.
I'm working from the same perspective since we'll always want to have an interpreted mode. I want JRuby to support pure interpreted, AOT, and JIT compilation.
I had never heard of NetKernel before your announcements. I will take a closer look when I have some time available. I'm very interested in real customers using JRuby...it open up potential for a larger commitment on our part in the future. Perhaps the JRuby world is growing to the point where fulltime resources are warranted.
We have been slowly developing a better API-independent way to embed JRuby (i.e. no dependency on BSF or JSR223). There's a little bit of that in 0.9.0, but whatever you had to do will certainly feed into the design. The intent is to simplify the process of creating a JRuby runtime and kicking off scripts the correct way.
We can always use more folks testing around release time and as we integrate new features and optimizations. Thank you for the offer!
--
Charles Oliver Nutter @
headius.blogspot.comHi Charles,
Very interesting data. This inspired me to run some benchmarks. It may
not be directly relevant but I thought you might like to see this data.
I just ran your benchmark [ fib(25) ruby code is interpreted
'uncompiled' on 0.9.0]. I compared against an equivalent fib function
in each of the dynamic languages that we have available on NetKernel.
Since last week's 0.9.0 that includes JRuby! Here's the results:
<times>
<test><lang>beanshell</lang><time>5.308</time></test>
<test><lang>groovy</lang><time>3.081</time></test>
<test><lang>_javascript_</lang><time> 0.185</time></test>
<test><lang>python</lang><time>0.402</time></test>
<test><lang>ruby</lang><time>18.657</time></test>
<test><lang>java</lang><time> 0.001</time></test>
</times>
Good lord, what's wrong with Groovy? We're only six times slower in pure interpreted mode (with a LOT of overhead and cruft and few optimizations) and they're compiled to bytecode? That sounds like a serious issue to me. Perhaps your test did not cache groovy's compile results? That performance seems really, really bad.
The rhino and python numbers are extremely impressive. Assuming no glitch in your test, the fact that Groovy can't compete with those two doesn't bode well. If we can follow their lead we'll be in great shape. I'll have to study their compilers in more detail.
Not inferring any great significance from this data since the results
are on 0.9.0 without any of your recent optimization work. For
background, the way our script engine works is to dynamically
compile/pre-parse scripts to the most optimal form we can manage in each
language. The optimization breakdown by language is:
beanshell v1.3: pre-parsed interpreted
groovy jsr6: compiled bytecode
_javascript_ rhino 1.6: compiled bytecode
jython: compiled bytecode
jruby 0.9.0: interpreted
NetKernel has dependency caching so we 'optimize' and then cache scripts
and only rebuild if the script is edited. It would be really great if
as part of the JRuby optimizations that there was an interface that
allowed us to build pre-parsed AST for caching.
I have mentioned issues before with pre-parsing, but we have a few potential solutions. We are also likely to create, in the short-term, a partially-compiled version of the AST to speed interpretation. Both the fixed preparsed AST and the partially-compiled AST will be cacheable.
Having become very familiar with embedding dynamic languages I'd say
that Rhino has the cleanest separation between compilation and execution
phases - the API allows you to run a compilation phase that pulls in
dependent scripts. Each execution of the compiled form can be passed an
execution context with passed in local variables etc. Worth taking a
look at for ideas.
I'm working from the same perspective since we'll always want to have an interpreted mode. I want JRuby to support pure interpreted, AOT, and JIT compilation.
FYI we integrated JRuby 0.9.0 last week. Its working great and
complements the existing choices we offer. We haven't issued a public
release yet but I know some of our customers are excited about the
possibility of using Ruby on NetKernel. A big thanks to you all for
your great work!
I had never heard of NetKernel before your announcements. I will take a closer look when I have some time available. I'm very interested in real customers using JRuby...it open up potential for a larger commitment on our part in the future. Perhaps the JRuby world is growing to the point where fulltime resources are warranted.
I have some other ideas with regard to embedding - we had to override
some of your classes to get what we needed. I'll post the details in a
separate thread (later in the week time-permitting).
We have been slowly developing a better API-independent way to embed JRuby (i.e. no dependency on BSF or JSR223). There's a little bit of that in 0.9.0, but whatever you had to do will certainly feed into the design. The intent is to simplify the process of creating a JRuby runtime and kicking off scripts the correct way.
Hope this data helps give a relative perspective across the current
embedded language scene. Not sure we can offer the depth of knowledge
to help with the detailed optimization but if you need a relative test
of a stable build just ask.
We can always use more folks testing around release time and as we integrate new features and optimizations. Thank you for the offer!
JRuby Developer @ www.jruby.org
Application Architect @ www.ventera.com
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel