By having the JIT produce code to inline the object allocation using its knowledge of the GC internals. I'm not recommending this approach, just saying that this is how things tend to be done in practice. And if you want to compete on speed then you're going to have to address the issue. (This seems to be an area where Java in Java wins if I understand it right, ie you can have your modularity cake and eat it too).
Well, inlining stuff sometimes makes things faster (though it sometimes doesn't). But I'd be seriously surprised if object allocation was simple enough to make it worthwhile.
I do take the point, however, that using dispatch tables without embellishment does preclude inlining.
It doesn't take me a huge leap to imagine including a function in the dispatch table that would do inlining instead of finding the appropriate function, though.
Cheers,
Ben.
-- http://www.apache-ssl.org/ben.html http://www.thebunker.net/
"There is no limit to what a man can do or how far he can go if he doesn't mind who gets the credit." - Robert Woodruff