Will Java go native?
Andrej Mitrovic
andrej.mitrovich at gmail.com
Fri Sep 20 03:16:12 PDT 2013
On 9/20/13, deadalnix <deadalnix at gmail.com> wrote:
> So basically what you do is :
>
> funptr = load from vtbl;
> if (funptr == compile_time_known_value) {
> compile_time_known_value();
> } else {
> funptr();
> }
OT: This reminds me of a small benchmark I did recently where using a
signal implementation with two pointers (function and delegate, to
allow connecting to both) is faster than using a single delegate and
converting a function pointer to a delegate via toDelegate(). It
boiled down to:
if (funcPtr !is null)
funcPtr(...);
else
if (delegPtr !is null)
delegPtr(...);
More information about the Digitalmars-d
mailing list