# Tail-Recursive & Body-Recursive Function Performance Across Elixir & BEAM versions – what’s the impact of the JIT?

**URL:** <https://forum.devtalk.com/t/tail-recursive-body-recursive-function-performance-across-elixir-beam-versions-what-s-the-impact-of-the-jit/138923>\
**Category:** Blogs/Articles/Talks/Podcasts\
**Tags:** elixir, blog-post, erlang\
**Created:** [9 January 2024 10:08 UTC](https://forum.devtalk.com/t/tail-recursive-body-recursive-function-performance-across-elixir-beam-versions-what-s-the-impact-of-the-jit/138923 "2024-01-09T10:08:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PragTob](https://forum.devtalk.com/user_avatar/forum.devtalk.com/pragtob/32/5613_2.png) [@PragTob](https://forum.devtalk.com/u/PragTob)\
**Post date:** [9 January 2024 10:08 UTC](https://forum.devtalk.com/t/tail-recursive-body-recursive-function-performance-across-elixir-beam-versions-what-s-the-impact-of-the-jit/138923/1 "2024-01-09T10:08:10Z")

</div>

Finally having finished my own little yak-shave of [figuring out a performance](https://pragtob.wordpress.com/2023/12/18/careful-what-data-you-send-or-how-to-tank-your-performance-with-task-async/) problem and [releasing benchee 1.3.0](https://pragtob.wordpress.com/2023/12/22/benchee-1-3-0-published-oh-save-the-memory/) to fix it here is what I was up to: Taking my old blog post about body-recursive vs. tail-recursive functions and benchmarking it across Elixir & Erlang versions from 1.6 @ OTP 21 up to 1.16 @ OTP 26 and see:

- How much faster have we gotten? What was the impact of the JIT?
- Did the performance characteristics change? (aka what’s the fastest for which input)

And spoiler alert, we got quite a bit faster and performance charteristics changed - read on to learn more!

> **[Tail-Recursive & Body-Recursive Function Performance Across Elixir &...](https://pragtob.wordpress.com/2024/01/08/tail-recursive-body-recursive-function-performance-across-elixir-beam-versions-whats-the-impact-of-the-jit/)**
>
> I’ve wanted to revisit “Tail Call Optimization in Elixir & Erlang – not as efficient and important as you probably think” (2016) for a while – so much so that I already …
