This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Artima Forums.

> I'm not sure if this forum is still around... I see lots of> messages from ~ June 1, but here's a shot.>They're all still around, though I don't check them as oftenafter the article they are based from goes off the front pageof whatever webzine it is published in. Visits trickle off too,but like yourself, people do come and post even after thearticle has been relegated to the archives.

> Was the article just simplified from a technical perspective,> or do we really not know more about how this method inlining> would function? It doesn't make much sense to me because at best> you'll still be left with a conditional branch in the code, one> direction of which is a function call, and that doesn't seem much> easier to optimize around than a method call. And it certainly> seems slower in and of itself than it would be to just call a> function indirectly (a single instruction even on the 6052, much> less modern CPU architectures!)>

> Maybe I'm just confused though. Could someone lay out some> pseudocode of what exactly the inlining is doing? I'm sorta> interested in the technique.

I'm interested in the technique too.

Actually, I didn't want to make the article any more technicalthan it was, but I also don't have much more detail about howthe inlining technique I described actually works. I didn't askSun, but I wouldn't be surprised if they wouldn't tell me much,as they likely consider this kind of stuff to be a competitiveadvantage.

I will, however, send an e-mail to the person at Sun whogave out the information I passed along, and hopefully theywill be inclined to add as much information as they are allowedto reveal about how the virtual method call inlining techniqueactually works and how it ends up a net performance gain.

You know how an idea can look very cool, exciting, and promisingwhen sketched out in labeled circles and arrows of variouscolors on a whiteboard. Everyone in attendence can tellyou how great an idea you have. But they'll also say, I lookforward to seeing the prototype.

That's where I think we (the Java programmer community) aresitting with respect to Hotspot right now. It looks great onthe drawing board, but I want to see the prototype actuallyzipping through my Java program at speeds close to natively-compiled C++. I can imagine that the Hotspot team willencounter unexpected difficulties as they go from drawingboard to working VM. Perhaps squeezing better performance outof better optimization due to dynamic inlining will be harderthan they thought looking at the drawing board. It remains tobe seen to what extent any such unexpected issues will slow downthe development cycle of the VM and the ultimate performanceof the VM itself.

If anyone else can shed more light on the details of dynamic inlining, please shine brightly.