Top "Tail-call-optimization" questions

A tail-call optimization is when a function returns directly the result of a called function, to avoid allocating a new stack frame.

What is tail call optimization?

Very simply, what is tail-call optimization? More specifically, what are some small code snippets where it could be applied, and …

algorithm recursion language-agnostic tail-recursion tail-call-optimization
What is the Scala annotation to ensure a tail recursive function is optimized?

I think there is @tailrec annotation to ensure the compiler will optimize a tail recursive function. Do you just put …

scala tail-call-optimization
Does Haskell have tail-recursive optimization?

I discovered the "time" command in unix today and thought I'd use it to check the difference in runtimes between …

haskell optimization lazy-evaluation tail-recursion tail-call-optimization
Why does the JVM still not support tail-call optimization?

Two years after does-the-jvm-prevent-tail-call-optimizations, there seems to be a prototype implementation and MLVM has listed the feature as "proto 80%" for …

java language-agnostic optimization jvm tail-call-optimization
How do I replace while loops with a functional programming alternative without tail call optimization?

I am experimenting with a more functional style in my JavaScript; therefore, I have replaced for loops with utility functions …

javascript recursion while-loop functional-programming tail-call-optimization
C tail call optimization

I often hear people say that C doesn't perform tail call elimination. Even though it's not guaranteed by the standard, …

c standards tail-recursion tail-call-optimization
Node.js tail-call optimization: possible or not?

I like JavaScript so far, and decided to use Node.js as my engine partly because of this, which claims …

javascript node.js tail-call-optimization
Does Java support tail recursion?

Possible Duplicate: Why does the JVM still not support tail-call optimization? I see so many different answers online, so I …

java recursion tail-recursion tail-call-optimization
Differences between JVM implementations

Where do JVM Implementations differ (except licensing)? Does every JVM implement Type Erasure for the Generic handling? Where are the …

java generics jvm jvm-languages tail-call-optimization
Does Java 8 have tail call optimization?

I tried digging on the web to get my question answered. I found some documents related to Project DaVinci. This …

java java-8 tail-call-optimization