From: William Djaja Tjokroaminata Date: 2002-10-24T00:39:53+09:00 Subject: Re: Things That Newcomers to Ruby Should Know (10/16/02) Hi batsman, Mauricio Fern?ndez wrote: > I consider the use of '<<' when possible to be nothing but a slight > optimization which might (or not) prove to make Ruby faster. > You can do a "incomplete RC" (in fact I think something like that was > already used in Ruby, somewhere), for the common case where an object is > referenced only once. If another variable references it, set a "shared > bit" to 1, and that's it. so you don't have to do complete RC which > would be expensive. If you do "incomplete RC", basically you have to find all the places where a variable (or another object) may start referring to an object. Do you have any thought of assessing a "complete RC" implementation? I know that the amount of work by going from "no RC" to "complete RC" is more than twice of going from "no RC" to "incomplete RC" as currently Ruby uses mark & sweep (M&S) gc (and therefore there exist a bunch of "new" functions but not a complete set of "delete" functions.) Well, Python started with RC and then added M&S. Ruby started with M&S and now the RC is being considered. I don't know which direction is harder or both are equally as hard. I am just thinking that it will be very nice if we can select the Ruby gc mode. > PS: I'm getting a computer of my own next week, and as I'm gonna have a > lot of free time, I may try this and other different tricks on Ruby's > implementation, following my new policy on how to improve Ruby [52838] > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/52838 Good luck on your quest and have fun with your new computer. Regards, Bill