Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyScript performance #104

Closed
almarklein opened this issue Mar 6, 2016 · 3 comments
Closed

PyScript performance #104

almarklein opened this issue Mar 6, 2016 · 3 comments

Comments

@almarklein
Copy link
Member

almarklein commented Mar 6, 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
Copy link
Member Author

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
Copy link
Member Author

Note to self: Transform.map in CG project would be a nice use-case for PyScript to produce efficient code without manual intervention.

@almarklein
Copy link
Member Author

Issue moved to flexxui/pscript #11 via ZenHub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant