> From: John Leuner <je...@pi...>
> I'm working on a separate little project to compile kissme into
> the linux kernel, this is of course completely non-portable, but
> provides excellent opportunity for using Java as a systems-level
> programming language, eg writing device drivers, managing memory
> etc.
> When combined with some clever run-time optimisation such as
> inlining, you could get a system that performs as fast as today's
> monolithic kernel OSes (NT / Linux), but with all the benefits of
> the Java language.
Maybe NT. :) Not Linux.
Seriously, I suppose you can really crunch during optimization and
end up with Java-derived native code that is nearly as fast as C-
derived native code, provided:
- You never use virtual methods.
- Either a) you never use exceptions; or b) your native code
never has to check an exception type before branching.
- You never have to specify exact alignment or packing of a
structure (neither of which can be guaranteed or even
specified by the Java spec). Hmm... This can probably be
restated as: You don't need 'C'-like structure accesses at
all.
This, however, does not give you much of the benefits of the Java
language. It doesn't let you write network protocol stacks or
device drivers, either.
Andy
|