Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #3109

Re: Tail Call Optimization (Tail Recursion)

From 7stud -- <bbxx789_05ss@yahoo.com>
Newsgroups comp.lang.ruby
Subject Re: Tail Call Optimization (Tail Recursion)
Date 2011-04-18 12:29 -0500
Organization Service de news de lacave.net
Message-ID <ef09b557ab56bb9fa49e426e2df5137a@ruby-forum.com> (permalink)
References <e3127e632c586f3979a7fcceaf07301d@ruby-forum.com>

Show all headers | View raw


Terry Michaels wrote in post #993440:
> I did some googling to find out if Ruby supports tail call optimization,
> as I wanted to write tail-recursive functions. All posts I found
> indicated that 1.9 supports this, but it is not enabled by default.
> However, all those posts were about two years old, so I'm wondering what
> is the current situation: do I still need to upgrade to 1.9 to get that
> capability? Or is there something in 1.8 I can enable?

Couldn't you test that by creating two recursive functions: one with a 
tail call and one without, and then benchmarking them?

-- 
Posted via http://www.ruby-forum.com/.

Back to comp.lang.ruby | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Tail Call Optimization (Tail Recursion) Terry Michaels <cmhoward@frigidcode.com> - 2011-04-18 00:59 -0500
  Re: Tail Call Optimization (Tail Recursion) 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-18 12:29 -0500
    Re: Tail Call Optimization (Tail Recursion) "WJ" <w_a_x_man@yahoo.com> - 2011-04-18 18:10 +0000
      Re: Tail Call Optimization (Tail Recursion) Louis-Philippe <default@spiralix.org> - 2011-04-18 15:40 -0500
        Re: Tail Call Optimization (Tail Recursion) "WJ" <w_a_x_man@yahoo.com> - 2011-04-18 22:27 +0000
          Re: Tail Call Optimization (Tail Recursion) Louis-Philippe <default@spiralix.org> - 2011-04-19 07:28 -0500
            Re: Tail Call Optimization (Tail Recursion) "WJ" <w_a_x_man@yahoo.com> - 2011-04-20 04:12 +0000
              Re: Tail Call Optimization (Tail Recursion) "WJ" <w_a_x_man@yahoo.com> - 2011-04-20 04:30 +0000
                Re: Tail Call Optimization (Tail Recursion) Robert Klemme <shortcutter@googlemail.com> - 2011-04-20 06:37 -0500
        Re: Tail Call Optimization (Tail Recursion) Vincent Manis <vmanis@telus.net> - 2011-04-18 19:41 -0500
          Re: Tail Call Optimization (Tail Recursion) Steve Klabnik <steve@steveklabnik.com> - 2011-04-18 20:42 -0500
            Re: Tail Call Optimization (Tail Recursion) Vincent Manis <vmanis@telus.net> - 2011-04-18 21:51 -0500
              Re: Tail Call Optimization (Tail Recursion) Michael Edgar <adgar@carboni.ca> - 2011-04-18 22:12 -0500
              Re: Tail Call Optimization (Tail Recursion) Steve Klabnik <steve@steveklabnik.com> - 2011-04-19 08:48 -0500
                Re: Tail Call Optimization (Tail Recursion) Brian Candler <b.candler@pobox.com> - 2011-04-19 08:56 -0500
                Re: Tail Call Optimization (Tail Recursion) Steve Klabnik <steve@steveklabnik.com> - 2011-04-19 10:07 -0500
  Re: Tail Call Optimization (Tail Recursion) Steve Klabnik <steve@steveklabnik.com> - 2011-04-18 12:39 -0500

csiph-web