From: Nikolai Weibull Date: 2005-06-02T07:10:59+09:00 Subject: Re: Method Chaining Issues Gyoung-Yoon Noh wrote: > Some non-destructive methods are usually implemented by > simply copying reference after calling destructive method. And some aren’t. Anyway, I’ve had gsub! be a lot slower than gsub in benchmarks. Still, some destructive methods will by their very definition be faster. > user system total real > Destructive 2.930000 0.000000 2.930000 ( 2.935663) > Non-destructive 3.170000 0.010000 3.180000 ( 3.171050) I’d say that a time-difference of 0.000235 seconds per call to String#sort!.reverse! versus String#sort.reverse doesn’t warrant destructive methods on strings (in this benchmark anyway), nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}