in reply to Re: using s/// as map?
in thread how can I speed up this perl??

Erm. Did you post the wrong version of your code?


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
Hooray!
Wanted!

Replies are listed 'Best First'.
Re: Re: Re: using s/// as map?
by jryan (Vicar) on Nov 25, 2003 at 05:59 UTC

    No? Would you care to elaborate? I just retested, and it works fine.

      Okay.

      sub chain { my ($genome,@genome) = @_; for ($i..$#genome) { ....

      Where is $i set? for $_ ( $i .. $#genome)? and 32 Uninitialised string in eq errors every loop, if the loop had a defined starting place.

      sub hash_array { my ($genome,@genome) = @_; $counts { $genome [$i] . $genome [$i + 1] } ++ for (0..$#genome); }

      Where does $i come from? <and that's only scratching the surface.


      Examine what is said, not who speaks.
      "Efficiency is intelligent laziness." -David Dunham
      "Think for yourself!" - Abigail
      Hooray!
      Wanted!

        Ah, you're right. I ran it and saw benchmark numbers that looked right, and so I figured it was fine. I'm sorry. However, it would have been courteous to not have been so vague in your first post; I probably would have bothered to re-look at my code.