From: Yukihiro Matsumoto Date: 2005-02-20T23:24:55+09:00 Subject: Re: destructive! operations Hi In message "Re: destructive! operations" on Sun, 20 Feb 2005 17:22:34 +0900, Navindra Umanee writes: |Is it more efficient to use the destructive versions of functions in |Ruby? I know that in Lisp/Scheme destructive counterparts are usually |offered for efficiency reasons. | |Can I assume that string.gsub! is preferable to string.gsub when I |know that the side-effect won't be affecting any other code? Although most (not all) of bang methods are more efficient than their counterparts, I discourage the use of them unless the performance is really problem. "Premature optimization is the source of all evil". matz.