Oh, one more thing... since I don't know why you are asking the question, I have to assume. And my assumption is that the reason you are asking is that you want to improve performance...
OK, assuming that - if you have to ask this question - then you are likely to get more bang for your buck investigating better algorithms than by switching languages.
That is - an experienced programmer would already know when and where to apply a different language. If you (or your programer(s) don't have the experience to know this - then you (or they) probably also lack the experience to select appropriate algorithms and techniques.
As an extreme over-simplification: if you are sorting something with a bubble-sort, you are going to get way more improvement by using a more advanced sorting technique than by switching from an interpreted language to a compiled one. Way, way, way more.
On the other hand, you might be asking because you want to hire somebody for a project, they know C++, and so of course you are hoping that every nail requires a C++ hammer. While a C++ hammer is useful in web development, it's not often the primary tool of choice.
It's generally a MUCH more expensive way to go than scripting languages, and requires MUCH greater skill on the part of the programmer.
But, I will repeat my own favorite quote (that is, from my own mouth) when asked by project managers "can we do such and such?":
"Sure, we can DOOOOOO anything!"
I don't mention the "but perhaps not at an acceptable cost" part. That's implied in the word emphasis. ;)