I agree with this. I have rewritten several C programs in Perl over the last year and a half or so and succeeded to improve very significantly the performances. In part because Perl enabled me to use hashes, having much faster access than scanning sequentially a C array. Of course, if we had a C library offering a behavior similar to Perl's hashes, C would become better. But there no such library that we know of for our version of our OS, so that Perl is the clear winner (admittedly, we could write a fast look-up C library, using indexed array access or a hashing function, but, even assuming we could do that efficiently, that would be a lot of work for very limited benefit). And, at the end of the day, it takes us so much less time to write a Perl program than a C program that, if the Perl program gives enough performance, I don't even wans=t to consider the C alternative.
Having said that, there are of course some cases (e.g. heavy mathematical calculations) where C extensions (with Inline C, XS or some other mechanism) will bring a real advantage (in terms of costs and benefits analysis) over pure Perl. I haven't seen yet a case where this would be the case in our work environment.
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.