Well like I said, except in cases where you know for sure that you have a fixed column alignment. Virtually all the data that I work with does not have fixed byte alignment. And in some of the files I work with, even if alignment is "fixed", the alignment shifts when some new release comes out of the other program. There are always trade-offs between efficiency and maintainability, etc.

I've done some testing with the regex engine in Perl 5.10 vs Perl 5.8 and earlier....its a LOT faster now. I've got one application that does a LOT of I/O and I've been considering using Storable for intermediate steps. This of course uses byte stream (and pack/unpack) to dump and re-create internal Perl structures. At the end of the day, final output will be in ASCII format of some type.

Most performance issues that I've found can be traced to improper algorithm or just flawed implementation. Perl allows very sophisticated algorithms to be implemented quickly and better algorithms can make a big difference! I can write Perl code about 5-10x faster than in C. Code runs maybe 1/3 the speed of C. So there are trade-offs!

I've seen some really bad code here on Monks and some of it will run just like a "herd of turtles". Sometimes that doesn't matter and sometimes it does!

So I guess this a "your mileage may vary" sort of thing.

Update:Now that I think more about this, misuse of OO techniques is probably a far greater performance hit. The OO performance hit is about 30%. This stuff is great for DB, GUI, but I've seen some situations where it is just plain goofy.


In reply to Re^3: Function call in regex replacement string by Marshall
in thread Function call in regex replacement string by PoorLuzer

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.