3 ms·
So I think the interesting question is whether the rest of us can learn anything from what happened there. I believe Mark Zuckerberg simply used the technology
by fauigerzigerk 3y ago
So I think the interesting question is whether the rest of us can learn anything from what happened there.
I believe Mark Zuckerberg simply used the technology he knew and took it from there. That's fine. I probably would have done the same thing.
But many people are making an ideology out of this, arguing that not giving a shit about performance is always the right choice initially because that's how you grow fast enough to be able to retool later.
I think this is based assumptions that are no longer true.
In the early 2000s, mainstream programming languages and runtimes were either fast and low productivity or slow and high productivity (Exceptions such as Pascal/Delphi did exist but they were not mainstream). And the cost of scaling up was prohibitive compared to scaling out.
Today, you can choose any fast high productivity language/runtime and go very far mostly scaling up.
- rafark 3y agoLearn what? That you should use the language that you’re more comfortable with and then scale? Or that languages have become more efficient? Php 8, for example, is many times faster than the php 4 and 5 that Facebook was using.
- fauigerzigerk 3y agoI think using what you already know remains a choice that is very hard to criticise. But we didn't have to learn that, did we? Beyond that I think there is more to unlearn than to learn from the history of the Y2K batch of startups. The economics of essentially everything related to writing, running and distributing software have changed completely.
- noir_lord 3y agoIn part the reason that PHP8 (and it was 7 that had the quantum leap in perf) are now so fast is precisely because of Hack - it was easy to accept the status quo on performance until Hack showed there really was a lot of performance left on the table. For me the biggest win was the changes they made to how arrays are stored in memory, I saw some systems drop by half in memory usage and had to change basically nothing - those kinds of wins are rare.
- rafark 3y agoYeah, I know the performance optimization were in part because of hhvm.
- ericbarrett 3y agoI take away two lessons from it, which are in a kind of essential tension that can only be mediated by wisdom and experience: 1) Pick technologies that you can optimize. 2) Don't over-optimize. Also, the concept of "optimization" here has very little to do with the language itself. It's far more about the overall stack, and it definitely includes people and processes (like hiring). It's not like FB invested $0 toward performance before swapping out PHP interpreters! Its massive caching layer, for example, was already taking shape well before HPHP (the C++ transpiler which preceded HipHop), not to mention the effort and tooling behind the MySQL sharding and multi-region that still exists in some form today. Many backend FB services were already written in C++ by 2010. But they had already gone very, very far—farther than most businesses ever will—on "just" PHP. Heroics like HPHP only happened after enormous pipelines of money were already flowing into the company.