4 ms·
Big companies like Facebook and Google do write their web tech in C/C++ because performance and power consumption does matter. If something written in Rails is
by quelsolaar 5y ago
Big companies like Facebook and Google do write their web tech in C/C++ because performance and power consumption does matter. If something written in Rails is ten times slower then in C, that means ten times more servers using ten times more power. As I'm sure you can imagine, cutting a zero of these companies server bills is a big deal. You can buy a lot of hours doing manual memory management for that kind of money.
- notacoward 5y agoI don't know about Google, but that certainly didn't seem to be the case at Facebook. PHP/Hack was the language of choice for front-end stuff, C++ for most of the code in infra services, and Python holding everything together.
- Mikeb85 5y agoYes, both are replacing some PHP/Python bits with C++ AFTER scaling to billions of users... Still curious what the power savings are... I'm sure they've done enough profiling to know their performance is increasing. But are they saving energy? How about the compilation cycles to get to where they are? The carbon footprint of the additional employees? Etc...?
- colanderman 5y agoFacebook runs PHP via their own JIT, HHVM (https://en.wikipedia.org/wiki/HHVM https://en.wikipedia.org/wiki/HHVM). Researching a bit now it appears they've actually migrated to their own subset of PHP called Hack, which is measured in the benchmark, and looks more efficient than even some compiled languages in that benchmark.
- notacoward 5y ago> How about the compilation cycles When the code will be deployed on 10K-1M machines, compilation costs are noise. In fact, FB does all sorts of expensive optimizations to ensure that the deployed executables are as efficient as possible, and the effort is worth it many times over. I'm sure the same is true at Google and elsewhere.