swarm-modeling
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compare Swarm with Repast


From: Marcus G. Daniels
Subject: Re: Compare Swarm with Repast
Date: Mon, 12 Aug 2002 16:28:11 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.1b) Gecko/20020606

Gulyas Laszlo wrote:

On Mon, 12 Aug 2002, Russell Standish wrote:
Problems with Java.

1) Its slow

OK. Compared to, exactly what? It's much slower than
C, of course, but I am not sure about Objective-C (with
TCL/TK, JavaSwarm, etc.). Especially not on a Windows
computer that acutally has to emulate Unix to start it up.

Run a Hello World with Sun JVM on a Windows box and compare
it to the runtime of a Cygwin executable.  In real time, the latter
is about six times faster.
Now compile with -mno-cygwin and generate a pure Windows
executable with none of that scary "emulate Unix" stuff and you'll see that the difference is about seven times faster. Not exactly what I would call painful.

Note that the JVM DLL itself is even bigger than the Cygwin, and it is just the first of several DLLs to get loaded in practice, never mind the countless bytecode classes.

Of course, this has nothing to do with Java per se, just a common result of using a common implementation of Java. There are other options, such as using native code compilers for Java like GCJ. GCJ-compiled Java classes are binary-compatible with G++ compiled C++ classes, and except for memory allocation overhead of the conservative garbage collector, have the same performance: the performance of C.

When it comes to screen widgetry the story of tradeoffs is the same. For example, with JavaSwarm there are the Tcl/Tk libraries to be loaded. With a pure Java there's the AWT DLL, and tons of Swing bytecode. There's no free lunch.



                 ==================================
  Swarm-Modelling is for discussion of Simulation and Modelling techniques
  esp. using Swarm.  For list administration needs (esp. [un]subscribing),
  please send a message to <address@hidden> with "help" in the
  body of the message.
                 ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]