Speed of Java (was: Linux on old laptop in two stages)
Ben Scott
dragonhawk at gmail.com
Tue Jun 6 15:54:14 EDT 2006
On 6/6/06, Christopher Chisholm <christopher.chisholm at syamsoftware.com> wrote:
> when you think about how java works, it compiles programs to byte code, which
> is then executed on each platform by a virtual machine.
Correct.
> what if someone created a linux kernel that could directly interpret
> and execute this byte code?
You'd be doing nothing more (or less) then implementing a Java VM in
kernel space, which wouldn't really get you a whole lot, and would
cause all sorts of *other* headaches.
I'm mildly curious about things like GCJ (http://gcc.gnu.org/java/),
which aim to compile Java-the-language to machine code for the host
platform (e.g., i386), rather than compiling to machine code for
Java-the-machine. In particular, I'm wondering what kind of impact,
if any, it has on performance and memory usage.
> programs could have direct access to system resources, and it wouldn't be up
> to a virtual machine to handle memory management and other areas that affect
> efficiency.
I was under the impression that one of the fundamental design
assumptions of Java is that you don't have direct access to things.
Many would argue that this is a strength -- you don't have problems
like buffer overflows, double-free()'s, memory leaks due to forgetting
to free(), etc. Given the bugs I encounter in programs every day, I'm
inclined to agree that many of the people writing software can't
manage such things reliably.
-- Ben
More information about the gnhlug-discuss
mailing list