On June 18, Pierre said, "Ok, there is the performance issue, but things are getting better; the release I'm currently working on (3.2.7) runs the pystone test 2.5 faster than 3.2.6. It's still 15 times slower than CPython, but in the early days it was thousands of times slower."However, in March 2015 in his blog articlehe showed pystone benchmarks in which Brython was much faster than CPython for many of the individual tests, and in only one test was Brython nearly 15 tims slower (create_function.py, a factor of 14.38).I don't understand how to reconcile these two comparisons.
The factor of about 5 times CPython speed for rapydscript-ng increases to about 7 times CPython if I turn off operator overloading that is used in GlowScript VPython, in which for example a+b is converted to a["+"](b); this is done to permit easy manipulation of 3D vectors.
Agreed about the limitations of benchmarking. The most useful benchmark is the particular program of interest, not a general program such as pystones. As I too said, the goal of a Python-to-JavaScript transpiler may be different for different usage patterns. GlowScript VPython is aimed at making it possible even for novice programmers to write computational programs that generate navigable real-time 3D animations as a side effect of the computations, with syntax that is as close as possible to true Python for the basic aspects of Python. Divergence from true Python is tolerable in this situation for elements of Python unlikely to be used by novice programmers. One can write programs at glowscript.org in JavaScript, but most users choose to write in Python.
As I perceive the situation, Alex Tsepkov's goal for rapydscript is to provide a thin wrapper around JavaScript, to facilitate the work of web programmers, with easy intermixing of (for example) jquery and JavaScript, whereas Kovid Goyal's goal for rapydscript-ng is to come closer to true Python syntax while still preserving as much as possible rapydscript's speed. Since GlowScript is not aimed at web programmers, I'm in the process of changing from rapydscript to rapydscript-ng. I've tried to track some of the developments of other transpilers, and recently I saw a post somewhere that suggested that Brython's speed had increased substantially, which is why I raised my questions.
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+unsubscribe@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/c6ed106a-4017-45f2-8d81-cdae61b70387%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I ran pystones using the rapydscript-ng transpiler, and it benchmarked 5 times the speed of CPython on my Windows 10 computer, 600000 pystones/sec vs. 125000 pystones/sec. I hasten to say that while speed is important for the computational uses to which VPython is put, speed may not be the important issue for other Python-to-JavaScript usage patterns.