xorebxebx wrote: |
---|
For light, non CPU intensive tasks, but large programs (lots of libraries used only sometimes), the time to load a large executable may be huge compared with the time of interpreting of the small part of the code that is already in memory (and linked). |
It all depends on the nature of the application in question. But it is a terrible over-generalization to say this:
xorebxebx wrote: |
---|
C++ is not for web-apps. Definitely. |
Or much worse this:
xorebxebx wrote: |
---|
CGI is dead slow. Evel old, dead slow, interpreted Java 1.0 is a rocket compared to it. |
This is non-sense. You can code slow C++/CGI certainly, linking to extraneous and bloated libraries - just as you can code fast or slow Java, or Python, etc. But this statement goes way over the top to generalize. I've coded many C++ based CGI's and you can strip it down to its core necessities and there's no way it would be slower than the overhead in the abovementioned languages (which is much more significant than most people realize). If you're a bad C++ programmer, then yes, you can make a CGI slower than Java 1.0.
To give it context: EBay, Google and Yahoo are still all running C++ CGI's.
Ultimately, most web applications center around common usages that many higher level languages like Ruby, Python, etc. cater for and it certainly makes it easier to develop with. And the overhead is negligible in many (not all) situations.
But there is no denying that you can do more in C/C++, and given the effort, you can implement something that is better performing than a scripted counterpart.
Whether or not this effort and flexibility is necessary (or noticable) depends on the requirements of the project.
xorebxebx wrote: |
---|
Besides, if you really need performance, you should use ASP.NET or Java - which run native code. They are capable of handling thousands of requests per second. This is not possible for CGI (write a hello world program and test how many times per second is your OS able to load and run it). |
It is absolutely possible, you can implement it as FastCGI.