On 9/20/13, deadalnix <deadal...@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(...);