Will Java go native?
deadalnix
deadalnix at gmail.com
Fri Sep 20 00:19:42 PDT 2013
On Friday, 20 September 2013 at 05:31:09 UTC, Dmitry Leskov wrote:
> Our AOT compiler does inline virtual calls of non-final methods
> that are not overloaded in any subclass known at compile time.
> Of course, there is a runtime check and a backup virtual call,
> but the check is cheap and code size increase in negligible.
>
> What we don't do (yet) is profile-guided optimizations, but
> that is on our to-do list.
>
So basically what you do is :
funptr = load from vtbl;
if (funptr == compile_time_known_value) {
compile_time_known_value();
} else {
funptr();
}
Which avoid the indirection if the function is actually called
most of the time. Am I right ?
More information about the Digitalmars-d
mailing list