Tagged: tail recursive

  • tco_method

    Introducing the tco_method gem

    Earlier this week I published a gem intended to help simplify the process of compiling Ruby code with tail call optimization enabled in MRI Ruby. The gem, tco_method, builds on my recent research into the internals of Ruby's implementation of tail call optimization and the ideas presented in Nithin Bekal's...
    Tail Call Optimization in Ruby: Deep Dive

    Tail Call Optimization in Ruby: Deep Dive

    In my last post, I began an exploration of tail call optimization in Ruby with some background on tail call optimization and its little known existence and usage in Ruby. In this post, we'll continue that exploration at a much lower level, moving out of the Ruby layer and descending...
  • Recursive Guinea Pigs

    Tail Call Optimization in Ruby: Background

    Back in November, care of /r/ruby, I came across a blog post by Nithin Bekal, Tail Call Optimization in Ruby, demonstrating Ruby's built-in support for tail call optimization and I have to admit, my mind was a little blown. It's not that I have a specific need for tail call...