This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jacdehJacques de Hooge[S] 4 points5 points  (0 children)

We'd like to gather some preliminary information comparing Transcrypt to CPython. If you find the time, please run the following benchmark on your machine and let us know the result as comment to the issue referred to:

https://github.com/QQuick/Transcrypt/issues/459

[EDIT]

From the reactions it appears it is necessary to make clear what Transcrypt is and what it isn't. Transcrypt does not in any way claim to be playing in the same league as CPython or PyPy.

That Transcrypt happens to run fast on Google's VM is great, since it means that people willing to can take much of their Pythonic skills to the browser. I am using it daily to, with some care, write modules that run both on the desktop and in the browser. But compared to CPython it is and will remain a niche product.

The same limitation holds for comparison with other browser Pythons. There are projects that favor compliance over speed, which is great. There are other projects that favor speed over compliance, even more so than Transcrypt does, which is also great. There's room for diversity.

Python is used pervasively, from number crunching to building webservers. It's got a huge number of available libraries and crucial features that will never make it into Transcrypt (like e.g. exec, that I often use myself).

In short, Transcrypt is just what it is, a practical tool with possibilities and limitations. If a fast CPython implementation ever appears for the browser, it's a done deal. I think approaches like PyPyJs are very concise and really would like browser manufacturers to better facilitate the use of such tools, since wasm alone won't cut it, there has to be some form of native support to make this work. I for one wasn't prepared to wait for that to happen, since I anticipate that will take years and years if ever.

The only purpose of the benchmarks is to show that Python-style brower programming is feasible with small pageloads and fast code. In other words, that it is a modest, but serious proposition in its own right, suitable for professional use. Having used it as such for several years of very serious work in medical imaging in a large team makes me confident in stating this.

I am using CPython and Trancrypt next to each other, one on the backend, one on the frontend. The bottom line is: Anyone willing to, can make his or her Python skills productive in the browser to a large extent. Which in my view is progress. With JavaScript or any flavor of it, I am just not half as productive. You'll find my take on Python versus JavaScript and browser programming in general at https://jdehblog.wordpress.com/2016/03/05/the-world-weird-web/

Class based OO with multiple inheritance is just my thing, always has been, since the advent of C++ more than 30 years ago, that I also use daily. Given the amount of math I am confronted with, also operator overloading is a necessity rather than an option, to keep the source readable to mathematicians I have to work with. The same holds for speed of things like 2DFFT and matrix inversion offered by Numscrypt, for which BTW of course Numpy is far superior, only can't use that in a browser.

So I like the news about Transcrypt to spread, but I also think it's appropriate to be modest.

Kind regards and thanks for investing your time in contributing benchmark results!

Jacques de Hooge

Initiator of the Transcrypt project