From: "M. Edward (Ed) Borasky" Date: 2007-07-21T13:23:15+09:00 Subject: Re: The Pebble in the Ruby Shoe Logan Capaldo wrote: > Interesting. This is wild speculation of course, but I imagine you are > probably atypical as far as always using explicit stacks. (Since I get the > impression from your post history that you are heavily focused on > performance.). I would guess (more speculation ;)) that if someone were to > grab a set of programs that for instance walked an XML DOM (or a similar > day to day tree structure, like a nested directory) that the vast majority of > those programs would use recursion with implicit stacks. Now that I've > contributed that bit of unsubstantiated nonsense, I'll resume eating my > dinner. :) 1. I am the very model of premature optimization. Unless the underlying run-time has made a great effort to make (tail) recursion efficient, like most Lisps, Schemes, and the core of Derive, it's usually less efficient than iteration and harder for other programmers to understand. 2. I've been quite fortunate in avoiding XML so far. I like *my* trees with squirrels and blue jays in them, thankyouverymuch. 3. Perhaps Charles Nutter would comment on how efficient jRuby on the JVM is at recursive code compared to MRI Ruby. I'd expect it to be better, given that some Schemers were involved in the creation of Java. :) >