From: mgarriss Date: 2003-08-26T07:17:29+09:00 Subject: Re: Ruby launching system apps? Lothar Scholz wrote: >>Avoid premature optimization. If the inefficiency is a problem, >> >> > >I hear this a thousand times, but this makes it not more truth. >You should only avoid optimization if it results in a more complex >structure. This is only in a few cases the reality. Often an optimal >datastructure doesn't take longer to debug or to write. > The whole quote was: "Avoid premature optimization. If the inefficiency is a problem, implement in Ruby. If it is still a problem, extend Ruby with C. " I think Mark was trying to say that using the unix sed command might be faster then a Ruby equivalent. a) try reworking your algorithm, still too slow?, b) write it into a C extension (might even be able to use some of the sed source code here). The benefit of this approach is that the end result is much more Ruby-like and platform independent. Everyone can benefit from your work. Michael