How come my converted awk/sed/sh script runs more slowly in Perl?

The natural way to program in those languages may not make for the fastest Perl code. Notably, the awk-to-perl translator produces sub-optimal code; see the a2p man page for tweaks you can make. Two of Perl's strongest points are its associative arrays and its regular expressions.

They can dramatically speed up your code when applied properly. Recasting your code to use them can help a lot. How complex are your regexps?

Deeply nested sub-expressions with {n,m} or *operators can take a very long time to compute. Don't use ()'s unless you really need them. Anchor your string to the front if you can.

Something like this: next unless /^. *%. More.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions