Re: How fast is Java?
- From: "Oliver Wong" <owong@xxxxxxxxxxxxxx>
- Date: Thu, 27 Jul 2006 13:58:39 GMT
<tabun@xxxxxxxx> wrote in message news:WMSdnQCcx-huglrZnZ2dnUVZ_vudnZ2d@xxxxxxxxxxx
Jean-François Blais wrote:Many must have asked that question. I intend to write a few programs
which will be CPU intensive. I know a little of Java. Would a language
that yields native code, instead of bytecode perfrom much faster?
I recently wrote a minuscule C program containing one loop using a few
variables, and an equivalent java program, which was nearly as fast as
the C program. Unexpected result to me. When is Java slower?
See http://groups.google.com/group/comp.lang.java.advocacy/msg/4afdc4eda32ca731
What kind of program will I write? Programs for myself only. Only text,
no graphical user interface; batch processing; virtually no I/O. Mostly
comparing, and adding integers. Random access to memory.
Should I use my already installed Javac, or consider using another
language?
I'd recommend you write in whatever language you are most comfortable in (unless your goal is to learn Java, in which case, write them in Java). Don't worry about optimization until you actually notice a problem in performance. And then, look at optimizations at the algorithm and data structure levels before worrying about switching to a "faster" language.
- Oliver
.
- References:
- Re: How fast is Java?
- From: tabun
- Re: How fast is Java?
- Prev by Date: Re: Downloading javax.comm Communications API
- Next by Date: integer to string
- Previous by thread: Re: How fast is Java?
- Next by thread: Downloading javax.comm Communications API
- Index(es):
Relevant Pages
|