[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Choice of model language
From: |
Jan Kreft |
Subject: |
Re: Choice of model language |
Date: |
Fri, 5 Oct 2001 10:09:44 +0100 (BST) |
Hi,
On Tue, 4 Sep 2001, Methot, Chris wrote:
> Hi (2 questions below)
>
> I am trying to decide on Objective-C or Java. I have no predilections
> toward either and no C experience (which may imply a direction in itself).
> Perhaps there are those that feel the tighter restrictions of Java are more
> suited to beginners.
>
> I tried to do due diligence and search the ftp://ftp.swarm.org/ support and
> model archives but the ftp server has not been reliable from here lately.
>
> The only thing I subjectively noticed between them is that the interpreted
> Java example models seem to run slower than the Objective-C. Both use every
> spare cycle of my CPU but I have the feeling that the C programs are doing
> more. Now I have been doing performance work for 20 years so I know this
> subjective conclusion is fraught with errors but I do believe it is a safe
> conclusion based on what I have seen of interpreted code.
>
> Here are my 2 questions:
> 1. If compiled OOP-C is more efficient than interpreted Java can the Java
> models be turned into a native executable like C?
Incidentally, I've just converted a snippet of Java code for solving
nonlinear PDE's into pure C by hand, in order to see how far off my Java
code is from C in terms of speed.
Running the Java version with IBM jdk1.3.0 on Linux, it was only 5% slower
that the C version compiled with gcc -O3 (-O[1-3] all same speed). So,
with a modern jdk, speed is no longer an issue.
Interpreted Java is dead slow, however. Factor 20 slower for my program.
In other words, choose Java.
HTH, Jan Kreft.
> 2. Is Java a better bet for a beginner who used Fortran and Basic many years
> ago?
> I am more likely to run into people who know C than Java (which is
> still primarily a web tool).
>
> Chris Methot
>
>
>
>
> ==================================
> 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.
> ==================================
>
==================================
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.
==================================