Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Given the simplicity of the program (two nested loops), profiling won't tell you much ("the nested content is slow") until you've done some high-level analysis. If the nested loops can be eliminated or sped up, improvements will ensue. For example, if it's possible for $domain to have the same value for two rows of DOMFILE, a file is being read more often than it needs to be. And then there's the three-deep loop at the bottom. Efforts should be placed into flattening those. Once that's done, profiling could be used to do some micro-optimisations. Update: That one part of the program is IO-bound and the other is CPU-bound is noteworthy. Maybe parallelisation is an option. In reply to Re^2: Why is my program so slow even though I've used hashes?
by ikegami
|
|