Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Advice on make my programme faster

by lima1 (Curate)
on Feb 11, 2008 at 20:44 UTC ( #667442=note: print w/replies, xml ) Need Help??


in reply to Advice on make my programme faster

move
my $obj = $Measure->new($wn);
before the for loop (Update: suaveant already mentioned this, sorry).

Check your word list. Does it contain duplicated lines (you should never have to use Memoize)? Try this to spot errors:

sub similarity { my ( $w1, $w2 ) = @_; warn "'$w1' vs '$w2'"; return $obj->getRelatedness($w1, $w2); }

Replies are listed 'Best First'.
Re^2: Advice on make my programme faster
by smilly (Novice) on Feb 11, 2008 at 21:27 UTC
    thanks good advice for moving $obj from the loop.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://667442]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2021-04-14 12:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?