From: Robert Klemme Date: 2013-06-09T21:40:09+09:00 Subject: Re: How do I write a method, which returns whether the letters in a word occur in alphabetical order --20cf300fb23dc988be04deb7f6f5 Content-Type: text/plain; charset=ISO-8859-1 On Sun, Jun 9, 2013 at 2:10 PM, Albert Schlef wrote: > Well, let me "correct" myself, just for the record: even if splicing a > string copies their content unconditionally, it wouldn't be horrible > since (1) our code is intended for "word"s, which are relatively short; > How do you know? That's just an assumption. > and (2) this is a scripting language and the copying, done in C, is > negligible. > Depends on how often you do it. And, btw. often the expensive part isn't the copying but the memory management (GC bookkeeping and collection). Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ --20cf300fb23dc988be04deb7f6f5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable



On Sun, Jun 9, 2013 at 2:10 PM, Albert Schlef <= ;lists@ruby-forum= .com> wrote:
=A0
Well, let me "correct&quo= t; myself, just for the record: even if splicing a
string copies their content unconditionally, it wouldn't be horrible since (1) our code is intended for "word"s, which are relatively = short;

How do you know? =A0= That's just an assumption.
=A0
and (2) this is a scripting language and the copying, done in C, is
negligible.

Depends on how often = you do it. =A0And, btw. often the expensive part isn't the copying but = the memory management (GC bookkeeping and collection).
=A0
Cheers

robert

--
remember.guy do |as, often| as.you_ca= n - without end
http://bl= og.rubybestpractices.com/
--20cf300fb23dc988be04deb7f6f5--