Hi 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>

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.

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.

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 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).

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.

Thanks again,

Peter

PS If anyone wants to play with these tests just let me know and I'll 
send the NetKernel script library unit test module and our ext-script 
module with JRuby embedded.

Peter Rodgers
Architect 1060 NetKernel
http://www.1060.org


-------------------------------------------------------------------------
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

Reply via email to