4 ms·
I was looking at PyScript and I was disappointed when I saw this code. https://pyscript.net/examples/d3.html https://pyscript.net/examples/d3.html The python
by bb88 4y ago
I was looking at PyScript and I was disappointed when I saw this code.
https://pyscript.net/examples/d3.html https://pyscript.net/examples/d3.html
The python version is much much slower loading at least on my browser. I counted 7 seconds to having it render the graph.
I kinda wish they spent the time thinking about Dom manipulation from a pythonic point of view rather than just providing the python to js interface and calling it a day.
- xapata 4y agoWait a few years. This is an in-progress announcement, not an its-complete announcement.
- gtirloni 4y ago2 seconds on my phone. This is new tech, I'm sure it'll get optimized. JS engines have thousands of man-hours into them.
- bb88 4y agoYeah I'm not so sure. Browsers need to ship python natively, and then we can just drop wasm and run python directly with a pythonic interface on the DOM.
- ceeplusplus 4y agoNot sure that will happen given Python's resistance to incorporating a JIT. The only reason Javascript has acceptable performance is because there's been an absolutely insane amount of work on v8.
- selcuka 4y ago> Python's resistance to incorporating a JIT Python (the spec) is not against a JIT. Only CPython (the interpreter) is, which is a reference implementation. Other implementations such as PyPy use JIT. I guess Jython can also use the JIT features of the underlying JVM.
- ceeplusplus 4y agoRight, but other implementations are missing a lot of key libraries which rely on the CPython->C bridge.
- vips7L 4y agoGraalpython would be fast enough especially when C extensions aren't involved in the browser. Though I'm sure that comes with it's own complexities.
- anchitsadana 4y agoIt took less than a second on my basic af macbook lol.