The biggest performance gain will always be given by the programmer. A wrong choice for changing performance easily by at least 10 orders of magnitude.
Using right algorithms is always the best way. Using performatic libraries helps a lot. Language may make some difference, but only in very disparate languages will there be differences that can reach only an order of magnitude.
Cases of major differences are bad libraries. Most chaos should not change more than 3 or 4 times.
A language of script, interpreted, with dynamic typing and no mechanism seeking the least cost of abstraction can really make a big difference. But the difference won’t be so great just because transpilation. So much so that the gain became better when they started using the Hack. And more gain when they started using other languages.
Facebook did this because the initial decision was bad, there was a very large code base to be ported, for some reason they thought it was simpler to create a new infrastructure than to rewrite the whole code, which is completely absurd in a case like this. I mean, they were willing to do it. And of course, the gain for them was very great, if you’re using 10,000 servers and you can reduce it to 1,000, it’s worth the effort, I just think they could have rewritten the code in another language. Several unicorns preferred this path, even trying a much lower overall gain than Facebook, but even greater in detail.
Every Stack Exchange network, including the main site with about 10 million hits per month, could, in the extreme, serve everything on just one server (rotates in 9 to give off), and with much better performance than Facebook. In C# that is not even a language considered as performatic. This is engineering. There are people who do very simple things, no competition, just one operation, and clog the whole machine.
I even wonder if I needed all this. The expense to make such a fast software is probably higher than the additional cost a little more hardware, not to mention the inflexibility and difficulty of maintenance caused (the UX is hampered because of the adopted philosophy, the improvements are implemented at the turtle’s pace). Facebook is also like this.
Hardware will give linear gain at most, probably much less than this. And the added dollar gain will be much lower after entering the thousands.
I would answer a little better if the text of the question were a little better.
The speed of a car depends on the driver, manufacturer or tire?
– Pedro von Hertwig Batista
I think it’s from the manufacturer maybe the driver sees himself differently!
– Willian Fortes
The point is that there is no answer. If an area is deficient, the whole is affected. It’s an extremely broad question and you can’t point out something specific that’s more important. When you have a specific case, then you can analyze and see where the bottleneck is; which is impacting the program more severely. Broadly speaking, it is a question that does not have enough information to give a specific answer.
– Pedro von Hertwig Batista
Good way to think @Pedrovonhertwig thanks!
– Willian Fortes
@Williancesar The answer solved your question? Do you think you can accept it? See [tour] if you don’t know how to do it. This would help a lot to indicate that the solution was useful to you. You can also vote on any question or answer you find useful on the entire site
– Maniero