Performance is always dependent on compiler implementation, and those threads mentioned in the comments from 12 years ago probably do not reflect current compiler behaviour.
There is, however, once clear logical difference between funB and funD which is that funD can be overridden by a subclass whereas funB cannot.
One key consequence of this is that funD cannot be optimised for tail recursion but funB can. This is one reason why recursive algorithms are often implemented using a nested function like this.
Note that this can be modified by judicious use of final and/or private on funD or the containing class, but using a nested function avoids the need for this.