I suspect that my code is I/O rather than CPU bound. Eleminating the unneeded map operation seemed to drop a wallclock second off the runtime. Moving from a 330Mhz PC w/ IDE drives to a 200Mhz with SCSI drives dropped another wallclock second.
I think I could probabably eek out at least a few precious milliseconds by implimenting your suggestions, but if I really were concerned about speed I'd probably do more detailed benchmarking and look for the bottlenecks....
Since my site gets maybe 20 vistitors on a busy day and I'm moving to a database backed approach and I need to spend time on other things (sigh).....
btw, I'm not sure C is a speed win, even purely in terms of execution time. Programmer skill is much more highly corrilated with speed than language choice. (see paper by Lutz Prechelt
Thanks again for all your help.
--mandog
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.