The Benefits of PyPy.js and ASM.js
<script type="text/python" src="main.py"></script>
Ryan has gone on to say that, in his opinion, one of the major issues with using his PyPy.js in real world cases is that in order to begin running your code in Python on the web, each page has to download the PyPy.js interpreter, and it's not a small download. Currently, he says that the interpreter weighs in around 5MB when compressed. Once it's loaded however, the browser can cache the interpreter locally and avoid that cost in the future. To me, initial startup time is not really the big issue though, and while it's true that 5MB is a crazy big file to be transmitting over the web, most sites already force users to download that much data in ad tracking code alone.
What's the problem then?
Web applications are immense resource hogs. What typically takes kilobytes of memory in a native application takes megabytes on the web. Frankly, that kind of usage is pretty unacceptable as is, and bolting an interpreter on top of that will only make the problem worse.
X, my window manager (dwm), terminal (xterm), shells (zsh), etc. add up to about 80 MB of RAM. Chrome is using 4 GB of RAM. 50 times more.— Gary Bernhardt (@garybernhardt) November 11, 2015
What's the solution?
Looking at the history of programming languages and performance, you could make the argument that this is just the next step. You could, for example, argue that the jump from native code to interpreted languages like Python had a similar cost in speed and performance, and I'd grant you that point. It certainly could be that the web is the single most important and viable development platform and that the performance costs will be worth it.
The jump to using the web as the virtual machine in which we run the software of tomorrow should be one we take with caution. The speed penalties aren't large, and I'm happy that that's true, but with most desktop users still having less than 6GB of memory and mobile users teetering around a third of that, developers will have to be careful not to try too much at once. Games can allocate gigabytes of memory and get away with it, but when a user's entire application suite is in the cloud, memory will be, as it almost always has been, a precious resource.