Combination has nothing to do with it. In fact, programming languages have nothing to do with performance in a meaningful way, because what influences is how you use them, that is, how you program, regardless of how well it was designed.
Factors that influence performance loss:
- Poorly written back-end code.
- Not cache.
- Connections in the database without need.
- Frameworks that consume too much of the server for small applications.
- Front-end code with a large number Resources or libraries and CSS that are usually used without need.
A server (machine + network) feeble:
This is perhaps the most important item, usually a server Shared is shared with numerous customers who host their websites. In fact, most people use Shared or VPS (which is also shared but has fewer customers) to host their websites. These servers usually can’t handle much traffic.
- The more users accessing, the better the machine will need to be.
These are some points. IE, it is no use to hire the best type of server and will not use everything, the question is plan and design, if the site will have a lot of traffic then you will have to hire a better server, from a VPS to a dedicated one.
In all cases the good is to always take advantage of the cache, this varies from language to language (back-end). An example I can quote you is that you cache static files such as images, icons, js, css:
There is no way ready or magic formula to achieve the desired result, what exists are some steps such as:
- In front-end add only js, css and images that will actually use.
- In the back-end include classes you will actually use.
- Connect to a database or webservice only if needed.
- Make a good use of the cache.
- And the most important thing is to choose a server type according to the traffic you want to achieve.
About the benchmarks:
The benchmark is an operation performed in order to evaluate the performance of one software or compare it with another. You will find many comparatives on the back-end languages, but this is only one factor and usually in the end result it will not always be valid, I mean there really are some languages that have a slightly better performance, but it doesn’t mean that you use it will make your pages really quick.
I won’t post any benchmark results because most are based on ready frameworks or because usually different languages operate on different types of servers (operating system and http server), what is important to understand is that what has the greatest influence are:
- Your choice of server to hire.
- How you configure this server (if you have option to configure).
- How you program and develop.
In 99.9% of cases, speed of development and ease of maintenance are preferable to performance. Labor is usually more expensive than computational resources. That’s why they use PHP and HTML (mandatory for web systems), or any other scripting language. But if you want performance, you can do your code in C, which listens to the network and responds to the HTTP protocol, or even something similar in Assembly.
– mau humor
Facebook uses/used PHP. They used Hphpc, now supposedly they use HHVM which is the successor to Hphpc. It supports "Hack" and "PHP". This HHVM (http://hhvm.com/) was developed by Facebook itself, unless I was mistaken. Before PHP 7, the HHVM was extremely superior in speed. Today HHVM vs PHP 7 have minor differences, but HHVM is usually faster than PHP 7. Unless HHVM compiles code in C++, this helps immensely in performance. You can read more on https://goo.gl/0nnbYi.
– Inkeliz
It all depends a lot on what definition of performance you’re interested in. And if you ask "what is performance?" for ten different experienced programmers, you will get ten completely different answers. Also, as Guilherme Nascimento’s response demonstrates below, the choice of programming language is probably the least important factor in this.
– Victor Stafusa
Finally, you need to take into account which scenario really interests you as a performance factor. For example, it’s no use to use a super-optimized programming language to shred billions of numbers into matrices and make the craziest calculations you can imagine and that beats all the others in benchmarks about it, if your goal is to implement a social network site.
– Victor Stafusa