As I understand it, recursive functions are usually less efficient than equivalent non-recursive functions due to the overhead of function calls. However, I recently came across a tutorial that says this is not necessary for Java (and C #).
He does not say why, but I assume that this may be due to the fact that the Java compiler optimizes recursive functions in some way.
Does anyone know the details why this is so?
java performance c # recursion
katsuya
source share