Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

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?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2015-12-02 02:45 GMT
Find Nodes?
    Voting Booth?

    My keyboard shows this many letters:

    Results (32 votes), past polls