You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did some pystone tests some time ago, and then PyScript was much faster than cPython. Did these benchmarks again, and now its about the same. What feature that we added makes things so slow? Is it something significant, or just something that the test emphasizes on?
One option that I've always had in mind for this, and that's also used by Transcrypt, is to allow a kind of pragma, probably in the form of a with statement to create blocks of "pure JS", where e.g. operator overloading is not used.
Another approach can be to allow type annotations, and to infer types from literals, and thereby be able to take some shortcuts. Possibly use mypy to get more type information via flow analysis. The advantage of this is that its easier to "apply" from the user point of view, without the risk of a user going into "pure JS" mode but not knowing JS enough to oversee the pitfalls.
@almarklein commented on Sun Mar 06 2016
I did some pystone tests some time ago, and then PyScript was much faster than cPython. Did these benchmarks again, and now its about the same. What feature that we added makes things so slow? Is it something significant, or just something that the test emphasizes on?
See also #288
@almarklein commented on Thu Nov 24 2016
One option that I've always had in mind for this, and that's also used by Transcrypt, is to allow a kind of pragma, probably in the form of a
with
statement to create blocks of "pure JS", where e.g. operator overloading is not used.Another approach can be to allow type annotations, and to infer types from literals, and thereby be able to take some shortcuts. Possibly use
mypy
to get more type information via flow analysis. The advantage of this is that its easier to "apply" from the user point of view, without the risk of a user going into "pure JS" mode but not knowing JS enough to oversee the pitfalls.@almarklein commented on Mon Jan 30 2017
Note to self:
Transform.map
in CG project would be a nice use-case for PyScript to produce efficient code without manual intervention.The text was updated successfully, but these errors were encountered: