From: David Alan Black Date: 2001-01-02T20:08:30+09:00 Subject: [ruby-talk:8509] Re: speedup of anagram finder Hi -- On Tue, 2 Jan 2001, SHULTZ,BARRY (HP-Israel,ex1) wrote: > > Unpack. The following is based on all of /usr/dict/words, using > > letter frequencies derived directly from that file: > > > > user system total real > > [first reports removed] > > frequency 14.470000 0.000000 14.470000 ( 14.483800) > > orig_primes 24.450000 0.010000 24.460000 ( 24.458457) > > unpack 15.550000 0.050000 15.600000 ( 15.613195) > > > > I ran "frequency", based on the frequency Gotoken sent, and using the > first 10K words from /usr/dict/words. Unpack still wins in this situation > ( and I did not do any downcase-ing ). > > user system total real > prime3 1.432000 0.010000 1.442000 ( 1.442000) > unpack 1.021000 0.000000 1.021000 ( 1.022000) > frequency 1.101000 0.000000 1.101000 ( 1.101000) > unpack 0.962000 0.000000 0.962000 ( 0.962000) > prime3 1.151000 0.000000 1.151000 ( 1.152000) > frequency 1.101000 0.000000 1.101000 ( 1.101000) > I ended up using all of /usr/dict/words for this run, since otherwise basing it on that file's frequencies seemed sort of arbitrary :-) (Of course, 'a' ended up fairly high on the frequency list.) David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav