Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: nested combinations: algorithm advice?

by Jasper (Chaplain)
on Sep 22, 2004 at 16:54 UTC ( #392974=note: print w/replies, xml ) Need Help??


in reply to Re^2: nested combinations: algorithm advice?
in thread nested combinations: algorithm advice?

Yes, I tried doing the seen sort join thing before the matches thereby avoiding the 2 - 1, 1 - 2 overhead, but with the data given, there was no benefit (in fact it was slower).

I did benchmark your code against mine, and on the DATA, mine was about 40% faster. Possibly on a much more extensive set of data, the difference wouldn't be so great.
  • Comment on Re^3: nested combinations: algorithm advice?

Replies are listed 'Best First'.
Re^4: nested combinations: algorithm advice?
by revdiablo (Prior) on Sep 22, 2004 at 17:07 UTC
    with the data given, there was no benefit

    The given data was only a sample. [Yes, I probably should have said this. In retrospect, there are quite a few things I could have done better with my original question.] The actual data has several thousand lines. Yours may still be faster, but then there would be the additional step of eliminating the duplicate combinations.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (11)
As of 2019-12-16 12:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?