窥探 Python 在浏览器中的可能未来 - Łukasz Langa

  • Summary: The author's Python code was slow, so they made it faster with Python. They spent a week in the Aosta Valley with others and worked on getting SPy to run in the Web browser and unbreak Pyodide on iOS. They discussed the evolution of Python and the Web platform, comparing Pyodide and MicroPython. They introduced SPy, a research project that mixes compile-time and runtime code. They converted a Genuary entry to SPy to improve performance and added bitwise operator support. The author also discussed the potential of skipping CPython in the Web browser and the need for more resources for the SPy project.
  • Main points:

    • The author's Python code was slow and they made it faster.
    • They worked on SPy and its integration with Pyodide.
    • They discussed the evolution of Python and the Web platform.
    • They introduced SPy and its features.
    • They converted a Genuary entry to SPy and improved performance.
    • They added bitwise operator support to the SPy compiler.
    • The author discussed the potential of skipping CPython in the Web browser.
  • Key details:

    • The author gave a keynote in 2019 called "Python 2020+" and argued for the need for new Python-like languages on the Web.
    • Pyodide is a port of CPython running on WebAssembly, but has performance limitations compared to JavaScript.
    • SPy is a language designed to be friendly to Python users and can be fully compiled to native binaries or WebAssembly.
    • The SPy version of a Genuary entry was 100X faster than the original Python version due to pre-computation.
    • The SPy project is in early stages and the author had to add bitwise operator support and an array implementation.
    • The author discussed the potential of skipping CPython in the Web browser and the need for more resources for the SPy project.
阅读 15
0 条评论