# Yet another TCO thread

**URL:** https://discourse.julialang.org/t/yet-another-tco-thread/81146
**Category:** Performance
**Tags:** recursion
**Created:** [May 16, 2022, 11:23am UTC](https://discourse.julialang.org/t/yet-another-tco-thread/81146 "2022-05-16T11:23:18Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [May 16, 2022, 12:08pm UTC](https://discourse.julialang.org/t/yet-another-tco-thread/81146/4 "2022-05-16T12:08:58Z")

</div>

> [@Seif\_Shebl](#):
>
> Also, AFAIK, Julia doesn’t implement the tail-call optimization yet, which is crucial for the performance of recursive functions.

Moving this to a new thread as TCO discussions tend to quickly explode, and it’s irrelevant to the original discussion of Rust benchmarks (TCO cannot be used for a function like naive `fib`).

(As Stefan says, TCO is only for “trivial” recursion that can just as easily be written as a loop. Guaranteed TCO is mainly important in functional languages where recursion is favored over loops.)

See this thread and references therein: [Does Julia have tail call optimization?](https://discourse.julialang.org/t/does-julia-have-tail-call-optimization/64101)

---

_[View the full topic](https://discourse.julialang.org/t/yet-another-tco-thread/81146)._
