They did resort to all kinds of tricks. But your overal point still stands. The performance of python is lacking memory and it's embarrassingly slow. I hope python4 will have scripted for developing and compiled for production, like Dart. And a great compiler like Rust.
[0]https://instagram-engineering.com/static-analysis-at-scale-a...
The keyword here of course is "at scale". At what scale? Any commenter that believes what was written upthread should create a system and demonstrate that it can scale to Reddit levels.
I'm sure not even HN "does only that" and even that it does with a lot of help from caching, etc