From: Daniel Carrera Date: 2003-02-21T00:49:45+09:00 Subject: Re: optimization question On Fri, Feb 21, 2003 at 12:38:33AM +0900, Travis Whitton wrote: > > i think that better way to speed up this code is: > > > > h = data.scan(iptok).sort.uniqc.to_hash > > I'm using Ruby 1.6.8, which doesn't have a to_hash or uniqc method. When > were these methods introduced? Bulat is suggesting that we introduce the methods Array#uniqc and Array#to_hash. I agree with him. He does have a point that his algorithm was better, and my program was only faster because it was in C. I'll come back to this this afternoon to see if I can write those to methods. -- Daniel Carrera Graduate Teaching Assistant. Math Dept. University of Maryland. (301) 405-5137