On Fri, Apr 5, 2013 at 6:39 PM, Bill Ricker <bill.n1...@gmail.com> wrote: > THEORY > > Ever general computer science over-simplification has a BUT that is very > important. > > Recursion is as efficient as iteration ... > ... IF AND ONLY IF Tail Recursion Optimization is in effect. > > When Tail Recursion is in effect, you do NOT have all that call stack, > you're only one level down the entire time (which means no overhead and no > recursion limit either). > > (Whether you can be thread safe and tail recursive in any modern language i > haven't heard.)
Erlang is the best example. > PRACTICE > > When in doubt, benchmark. I always doubt my benchmarks. _______________________________________________ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm