There's a reason why the large companies often end up working on new runtimes/interpreters/compilers like HipHop for PHP, Hack, and so on, rather than working on the code bases written in those languages. It is very easy for it to not just be easier to leverage in at that level, but an order of magnitude or two easier. Or three.
Added up, it is easily more than 30s per line.
30s per line of current Python code, not compiler code.
And I'm just providing a number to put some numbers out there. 30s/line to convert a Python program to something fundamentally different like Go is probably an underestimate, yes, but then, if it's an underestimate that means the budget for the Python reimplementation is that much larger.
It also really helps the "subtle issues" when you control both the implementation and the code running on it; it means for every subtle issue discovered you have the option of either fixing the implementation or fixing the original code not to tickle the corner case. It's much harder when you only control one side or the other. It's not Google that will be having massive problems with corner cases.
Of course, if it started out as a "this seems like a cool project", that skews the "a is more efficient than b" ratio significantly.
For a project the size of YouTube, that will be millions of dollars of engineering hours and weeks/months of lost productivity for an unknown gain and almost guaranteed bugs. It's a terrible value proposition so it's better to squeeze every last drop of performance out of the code base you have, which at the scale if this project includes paying engineer(s) to work on a completely new runtime.
And there's a lot more side benefit in a better multithreading Python runtime for Google for other Python code Google has (or hosts), whereas the benefits of a YouTube rewrite are more narrowly limited to YouTube.
- search (the various search pages)
- trending
- channels
- subscription
- video uploads
- history
- comments
- likes
- upload
- video editing (most of this is in browser, but still)
- livestream
- video analytics
- payment and ad management
- video comment review and moderation
- translation
- captioning
- video replication, multiscaling, caching, and resolution management based on network speed
- video recommendation
- cards, overlays, annotations, etc.
- music and sound effect search
- antispam
- dmca and copyright tooling
And that was 5 minutes of poking around.Not so much a feature of YouTube as it is a feature of HLS/Dash... but yes, it means you've gotta transcode the source video into multiple different bitrates.
Is this supposed to be some kind of no true Scotsman?