Was goofing around, decided to write a blog post about how different
languages do the same thing (read and spit out file contents)... blog
post here:
http://huikau.com/2007/11/25/simple-file-io-in-different-dynamic-languages/

I got curious about the JVM impls, timed them and figured I would
share the results with this list:
lang        real time      lang ver

RHINO:   0m0.310s    (1.6R2)
GROOVY:  0m0.885s    (1.0)
SCALA:   0m1.312s    (2.6.0)
JRUBY:   0m1.668s    (1.1b1)

Not the most controlled test, just used built-in 'time' for Mac OS
X... (i.e. time jruby fileTest.rb)  This doesn't isolate the file IO
from the environment setup... but to a new user, this time counts.
(time spent waiting for your command line to return control.)  Simply
running:  jruby -e "a='a'" is only slightly faster if at all!

I have questions:
1. does the overall warm-up time for JRuby include loading actual .rb files?
2. is there a plan to compile all Ruby .rb files and stick them in a
jar for possible performance boost?
3. while we're at it... how about compiling all Gems to jars?
(command line option?)  I swear I heard this idea floating around
somewhere...
4. since I know my tests were not very scientific by any stretch...
what are some opinions on how to gather this type of data (speed,
determining JVM startup vs. environment load, etc.)

Rhino's numbers from the command line may not be attainable due to the
scope of the language... but it's something to strive for.

M

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to