If an application needs to be optimized for performance, you don't rewrite the whole thing in a different programming language. Instead, you profile the application, find its "hot spots" (the code where the program is spending most of its clock cycles), and rewrite only the code in those hot spots. Generally, those hot spots will comprise 10 percent or less of the overall code.
In practice, it is uncommon to change programming languages mid-project, because languages are commonly chosen for their applicability to the problem domain. Web applications are written in web languages because they run in browsers and web servers, and because most of your time is spent waiting for networks and databases, not crunching numbers. Games are not always written in such languages, because there are languages that are better suited to the gaming domain.
It's certainly not uncommon to write a prototype implementation when in an exploratory phase. I would bet the vast majority of such prototypes are written in the same language as the language used for a rewrite (which often never comes). Similarly, the language used for either part is likely determined by the local culture of the company implementing the code rather than "performance". No one is going to use a language they are not familiar with to write a prototype just because someone says it's "good at prototyping", at least not for critical functionality. Language choices are almost always predicated on familiarity.
As Robert Harvey states, usually programs (or really systems) are rewritten piece-meal, not all at once. Usually there are "hot spots" that can be rewritten in the same language or potentially a different language that will provide the needed performance gains. A whole rewrite for performance reasons would typically be after all the obvious "hot spots" were addressed, and an attempt to optimize the current code. Rewrites may also happen due to changes in the project's culture.
There have definitely been several public projects that have been rewritten from "high-level" languages to "low-level" languages, but it's often not clear what the motivations are and rarely are they solely performance. They may not even include performance. It's not clear how often this actually happens overall though. Again, culture likely has a dominant influence. For example, one of those examples is a project Paul Graham wrote in Common Lisp that was used by Yahoo for years but was eventually rewritten in C++ and Perl at a point when Paul Graham was not involved with the project.