Fastest scripting solution for Java?

Q

Qu0ll

Can anyone share their opinion on what makes the fastest scripting solution
for Java? As I will be using it in an applet context it is important that
it is fast without compiling to byte code (which is not possible in an
applet). I am familiar with Rhino but have no idea on comparative speeds
with Python or Groovy etc.

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
(e-mail address removed)
[Replace the "SixFour" with numbers to email me]
 
A

Andreas Leitgeb

Roedy Green said:
See http://mindprod.com/jgloss/scripting.html for a list of
possibilities. I have never benchmarked them.

" Traditionally, scripting languages have had the ugliest syntaxes of any type
" of computer language.
Ugliness is, of course, in the eye of the beholder.

" Usually scripting languages are interpreted (without even being preparsed)
" rather than compiled.
That they are not compiled like Java or C are, lies in their nature as
scripting languages. However they *are* usually compiled "just in time"
nowadays. For Tcl, it gets bytecompiled "just in time" for about a decade
by now.

afaik, perl and python do also see a round of complete pre-parsing and
bytecode compilation before they're actually run.

from those advantages you list for java, some are just fuzzy, and others
don't apply to script-languages (like compiling a bunch of those in one go -
that just alleviates a javac drawback) Some are just about "java versus
any other language at all" - with no distinction for "script-" or not).
The artificial limits of command lines are of course an OS problem, and not
so much one of the language... apropos: java does impose some 64k-limits
induced from the class-file format.

That said, I use Java, C/C++ and Tcl each in it's best suited places.
Java being the only of my langs that I have some certification for.
 
D

David Lamb

Roedy said:

Roedy,

Your site's collection of links are a nice help, but given your fairly
dismissive attitude about non-Java solutions I think the OP and I both
hope other people chime in with more information and guidance.

I am currently thinking through how to build a program to be modified by
users (hence my thread about multiple .jar files and JWS), and am
planning on starting, as you recommend, by having the mods written in
Java. However I have considerable trepidation about how much of a
barrier that's going to be.

My only experience with a product that's intended to be "scriptable" is
a game, Civilization IV, written in C++ with Python for scripting (and
XML for mods purely based on changing game data). There's a substantial
community of people who write mods for the game, and apparently a fair
bit that relative novices can manage to learn to write in Python. Java
is considerably more intimidating for beginners than Python -- in fact I
know of some universities that have switched from Java to Python as an
introductory language, though they may still teach Java as a 2nd or 3rd
language.

I have no particular attachment to Python, but I'd still like to know
more about some form of scripting that "fits" well with Java.

The OP was asking for "fast" but I'm thread-stealing somewhat to ask
about "easy to learn". Any opinions?
 
W

Wojtek

Qu0ll wrote :
Can anyone share their opinion on what makes the fastest scripting solution
for Java? As I will be using it in an applet context it is important that it
is fast without compiling to byte code (which is not possible in an applet).
I am familiar with Rhino but have no idea on comparative speeds with Python
or Groovy etc.

Try Rexx: http://www.rexxinfo.org/ (look for NetRexx)
 
A

Arne Vajhøj

Qu0ll said:
Can anyone share their opinion on what makes the fastest scripting
solution for Java? As I will be using it in an applet context it is
important that it is fast without compiling to byte code (which is not
possible in an applet). I am familiar with Rhino but have no idea on
comparative speeds with Python or Groovy etc.

As a rule of thumb: if performance is that critical then
a scripting language is most likely not the optimal choice.

If it is independent then I would go for JavaScript, because:
- it is bundled
- lots of people know it

If is has to be tightly integrated with your app(let), then I
would go for Groovy.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top