From: Kyle Rawlins Date: 2002-08-24T02:43:08+09:00 Subject: Re: Why Ruby Uses Mark-and-Sweep GC? --cpvLTH7QU4gwfq3S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 24, 2002 at 01:18:50AM +0900, William Djaja Tjokroaminata wrote: > 1) It is linear (O(N)) in the number of Ruby objects, and therefore it > seems that it will not scale well. Yes, probably for the majority of Ruby > applications, the cost of gc invocation is small as compared to all the > other functions in the Ruby code, i.e.,=20 >=20 > cost =3D eps * N >=20 > where eps is a small number. However, no matter how small eps is, as N > grows large, eventually the gc cost cannot be neglected. I'm curious how (or if) you've evaluated this empirically. I've been doing some IR stuff with very large numbers of objects (though I don't know how many offhand) and the cost of gc is (subjectively) not affecting what I'm doing at all. Granted, this isn't an application with any kind of interface that operates concurrently with processing. In my experience O(n) algorithms are thought of as a class of algorithms that _do_ scale fairly well. -kyle --=20 http://mas.cs.umass.edu/~rawlins -- Keeping time, time, time,=20 In a sort of Runic rhyme (Poe) --cpvLTH7QU4gwfq3S Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9ZnQoncsSsHSBypARAh5kAJwNcBGZolhz6YjW6mL3VrWvRXA5eACeMz0L vNUu8TOtf9HAoe3GnVRH2gM= =eiQc -----END PGP SIGNATURE----- --cpvLTH7QU4gwfq3S--