Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: Fast data structure..!!!

by dvryaboy (Sexton)
on Apr 15, 2008 at 16:21 UTC ( #680556=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Fast data structure..!!!
in thread Fast data structure..!!!

Assuming that $pos and $poss are two different things, and $pos is defined somewhere outside of the code snippet, you can save a bundle by doing something like this:

my $docpos = $pos{$docID}; for (1 .. $tf) { $docpos->{vec ($dp, $index++, 32)}=\$order; }
It may seem trivial, but that's about 2000000*avg_tf dereferences.
Getting rid of an unnecessary "my" variable should also pick up a few extra cycles.


Comment on Re^3: Fast data structure..!!!
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (13)
As of 2014-12-18 15:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (57 votes), past polls