On Fri, Apr 5, 2013 at 6:39 PM, Bill Ricker <[email protected]> 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 [email protected] http://mail.pm.org/mailman/listinfo/boston-pm

