Optimising invoke and return
gbenson at redhat.com
Fri Feb 20 04:02:15 PST 2009
Edward Nevill wrote:
> My poiny haired boss is in town today and I think my proposal to
> him will be that we do the template interpreter. Based on some
> benchmarking I did on the PC comparing zero with -Xint this should
> give us 6 X performance increase over bare bones zero (4 X over my
> current optimised implementation).
> Doing the template interpreter would also serve as a useful 1st step
> to doing hotspot (should we decide to go that way).
> Gary: Does the Hotspt Compiler use the template interpreter to do
> its codegen, or does it have its own codegen and only use the
> template interpreter to interpret uncompiled code. (I could check
> this myself in the source, but I am lazy).
The two compilers (client and server) and the template interpreter
are essentially independent. There's shared code, of course, but
they're essentially different.
Whether doing the template interpreter is a good idea depends on what
you want, and when you want it. If your goal is a high-performance
interpreter only solution then I'd say do the template interpreter.
The work involved is probably something like 6-9 man months to get it
mostly working, and maybe another 3 months to pass the TCK if that's
what you want.
If your goal is a high-performance interpreter+JIT combo, then adding
the client JIT to an existing template interpreter is probably 3-6 man
months, with maybe another 3 months for the TCK. I'm guessing here,
I haven't done a client JIT interpretation myself. I'm also assuming
you'd want client rather than server (it's probably better suited for
If you want a JIT but don't have a 12-18 months to do it in and can
accept good but not ultimate performance, then maybe Zero and Shark
are worth looking into. Shark is not bad now, and it could be in
something like a production ready state in 3-6 months.
That's my two cents...
More information about the zero-dev