Monday, May 24, 2010

Speed comparison of modperl vs. C++?

We are starting a development project and we want to be able to support as many simultaneous users as possible.





We are doing a lot of things in Perl and want to speed up key portions via using C++.





However, one of the programmers thinks that using ModPerl will result in something that is as fast as C++ and takes up as little memory (RAM) allocation.





Is there any good data on the comparison of speed and memory usage between ModPerl and C++?





If it helps we are using Mysql as our databsae back end and the environment is Red Hat Linux.

Speed comparison of modperl vs. C++?
good question!





Certainly Perl is faster to code. and good perl is shorter and more concise. Perl relies on C code on the inside, and compiles (similar to java) so it's not classically interpreted.





as far as size, they will be similar, because of modperl's reuse of resources. Most often the size in memory is more linked to the data, not the program.





Since most of the hairy code is actually in the database internals, there is no difference there.





Perl give you fast flexible code. but the bottom line is what the programmers know. Don't try to get great perl code from a C++ only programmer. Or vice-versa.





bottom line


speed to develop... PERL


speed to run... similar








additionally Perl %26amp; C can co-exist (even in the same source file) so everyone can contribute to the project!
Reply:I would say C++ is better at application programs Modperl would be faster then C++ cause it uses Apache API calls and is interpreted other then compiled.


No comments:

Post a Comment