- CPU-efficient: executing statements faster
- RAM-efficient: taking less RAM for the same stuff
- development-efficient: taking less programmer time to write a program to accomplish the same task
- maintainence-efficient: given a program that is already written, modify it to accomplish a new task
C/C++ is faster in terms of CPU. Why? Because C is Perl's machine language. Perl is tokenized to some assembler (soon-to-be Parrot), then each token is converted to some "machine language" which is implemented in (extremely optimized) C. If equally-optimized C is used without the Perl tokenization, it will necessarily be faster. Plus, C's data structures aren't stuffed with Perl's information-tracking additions.
So, C/C++ is more efficient in terms of the computer.
Writing a program in Perl, however, is generally quicker - in terms of programmer time - than in C/C++. I have a richer set of nouns (primitives) and verbs (operations) than in C/C++. More complex operations are supported in the language and there are operations in Perl than would require hundreds of lines in C/C++ to accomplish. This is especially true in string processing.
In addition, because C programs tend to be more complex than Perl programs, maintenance on them is more complex and error-prone. A 500 line Perl program is often equivalent to a 2500 line C/C++ program. That's five times the places an error can be hiding and five times the places you can inadvertantly add an error. I'm not keen on working with that kind of situation.
So, Perl is more efficient in terms of the developer.
Unless you need the computer efficiencies, I'd go with Perl.
(The astute observer notes that I didn't mention VBA. That's cause it's more of a fungus and not a computer language.)
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re (tilly) 1: What does "efficient" mean?!?
by tilly (Archbishop) on Jan 15, 2002 at 22:38 UTC | |
Re: What does "efficient" mean?!?
by Albannach (Monsignor) on Jan 15, 2002 at 20:39 UTC | |
by dmmiller2k (Chaplain) on Jan 20, 2002 at 06:18 UTC | |
Re: What does "efficient" mean?!?
by redsquirrel (Hermit) on Jan 15, 2002 at 20:25 UTC | |
Re: What does "efficient" mean?!?
by dws (Chancellor) on Jan 15, 2002 at 23:45 UTC | |
Re: What does "efficient" mean?!?
by ignatz (Vicar) on Jan 15, 2002 at 20:35 UTC | |
Re: What does "efficient" mean?!?
by mstone (Deacon) on Jan 16, 2002 at 04:57 UTC | |
Re: What does "efficient" mean?!?
by Necos (Friar) on Jan 16, 2002 at 16:10 UTC | |
Re: What does "efficient" mean?!?
by dmmiller2k (Chaplain) on Jan 20, 2002 at 06:04 UTC |