RE: [Sablevm-developer] reflection classes for constant pool and bytecode data
Brought to you by:
egagnon
From: John L. <je...@pi...> - 2000-08-23 21:11:30
|
> > 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. Let me restate that. Instead of saying you'll get a kernel "as fast" as a C monolithic kernel, I think that the advantages of dynamic optimisation (run-time profiling etc) and removal of a userspace/kernelspace barrier will allow such a system to approach the overall performance of a monolithic C kernel. But you're right, as long as you're using Virtual Methods, relying on automatic GC and exceptions you won't be able to achieve the same speed. I didn't understand the bit about alignment and packing? > 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. Well you can write code of that kind by providing magic methods which are compiled from assembly to provide access to raw hardware. John Leuner |