Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Just another Perl shrine
 
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 making s'mores by the fire in the courtyard of the Monastery: (15)
As of 2014-04-17 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (444 votes), past polls