http://qs1969.pair.com?node_id=762293


in reply to Re: tips on how to speed up a very slow perl script requested
in thread tips on how to speed up a very slow perl script requested

Yes, I tried that but it wasn't very successful (seeing as my grasp of hashes is rather pathetic)
  • Comment on Re^2: tips on how to speed up a very slow perl script requested

Replies are listed 'Best First'.
Re^3: tips on how to speed up a very slow perl script requested
by moritz (Cardinal) on May 06, 2009 at 15:23 UTC
    Here is what you need to do:
    1. Declare a hash
    2. Read the first file line by line, populating the hash
    3. iterate over the second file, and look up the values in the hash

    In your current program, you compare things to $pdbchain, so your hash keys have to be constructed exactly in the same way as $pdbchain

    Give it a try, and when you have problems, come back with more specific questions.

Re^3: tips on how to speed up a very slow perl script requested
by planetscape (Chancellor) on May 07, 2009 at 03:21 UTC

    Please, when you have an instance like this, post your code. Doubtless someone here can find and correct the error. If you can't post it because it's long since been over-written, I'd suggest you look into a Version Control System. Sometimes good approaches get discarded because a detail or two gets in the way.

    HTH,

    planetscape