3 ms·
Why not write a Py->JS transpiler to solve the efficiency problem?
by amelius 11y ago
Why not write a Py->JS transpiler to solve the efficiency problem?
- rpearl 11y agoI can't tell if you're joking, but if not... No, JS isn't more efficient than Python.
- infogulch 11y agoI couldn't tell either. Poe's law in full effect.
- RubyPinch 11y agohaving a Python JITing VM written in python, compiled to javascript, can actually be faster than CPython (after warmup!) https://www.rfk.id.au/blog/entry/pypy-js-faster-than-cpython/ https://www.rfk.id.au/blog/entry/pypy-js-faster-than-cpython...
- Johnny_Brahms 11y agoMaybe not, but if you are doing single threaded stuff in python you will probably get better performance by using node. Now, I'm no python or javascript programmer, but I generally get a lot better performance for small scripts using node.
- deleted 11y ago[deleted]
- outworlder 11y agoSarcasm detector is also failing. But even compiling to C would not magically solve the issues.
- talideon 11y agoA big part of the reason why the likes of V8 are fast is because they can concentrate on being single-threaded. If you wanted to write a transpiler, it would need to be targeted at a JS implementation that allowed for multiple threads to be run at the same time. If you did that, you'd have a JS runtime with similar problems to CPython.