In the browser environment, people usually use quite a few inline anonymous functions. Javascript is great at this since you can define full-blown anonymous functions anywhere. Python, on the other hand, is definitely one of the worst at this. You can only create one-line, single-expression anonymous function with its lambda keyword. Of all the languages you want to convert to JS so that it runs on the browser, Pytho…
I really don't understand this obsession with anonymous functions. If you're doing anything longer than one line, there is absolutely no reason why you should be sticking the entire function definition as a parameter. I've had great usage from Javascript where I have separate functions with proper names and formatting, and then pass a reference to them into the code that asks for them. Can someone please enlighten me…
PyPy.js: Now faster than CPython
61–70 of 80 posts
Re: PyPy.js: Now faster than CPython
#62Earlier quoted context omitted.
Yes, Safari has been working on an LLVM-based JIT called FTL. It now outperforms v8 on almost all asm.js benchmarks, http://arewefastyet.com/#machine=12&view=breakdown&suite=asm... That's not in release versions of Safari yet, it was just enabled on trunk. But it will make Safari very competitive once more.
What if LLVM based JITs with NaCL style security were available in all browsers except IE? (I'm just assuming Microsoft will drag their heels.) Then an LLVM IR based bytecode could become a standard bytecode for browsers.
In the meantime, browsers would still be free to compete based on their JIT implementations.
With rust and by proxy, Mozilla/Samsung's experimental Servo layout engine targeting the LLVM, I can also see potential synergy in this situation.
Re: PyPy.js: Now faster than CPython
#63Earlier quoted context omitted.
Clean and efficient concurrency primitives? I think not? I would be very interested if that is indeed the case.
Stackless Python has very clean and efficient concurency primitives, something lot of people dont seem to know..
Sounds like a good topic for a post (or at least a link - hint, hint).
Re: PyPy.js: Now faster than CPython
#64Earlier quoted context omitted.
I really don't understand this obsession with anonymous functions. If you're doing anything longer than one line, there is absolutely no reason why you should be sticking the entire function definition as a parameter. I've had great usage from Javascript where I have separate functions with proper names and formatting, and then pass a reference to them into the code that asks for them. Can someone please enlighten me…
I suggest you read SICP and gain an appreciation for higher-order functions. Once you do, you will probably have answered your own question. http://mitpress.mit.edu/sicp/
Re: PyPy.js: Now faster than CPython
#65I am colourblind and have problems with your choice of red and green for graphs.
Re: PyPy.js: Now faster than CPython
#66Re: PyPy.js: Now faster than CPython
#67Earlier quoted context omitted.
I still don't get the point of using Go instead of PyPy or Cython.
Because Go is at least as fast as PyPy or Cython, have a similar coding feeling to Python, have language level concurrency support, and has a clear/consistent development roadmap moving forward. PyPy is not really a good example here. It is still highly experimental, takes long time to compile, it's not compatible with quite a few libraries in normal Python, and still has all relative downsides of dynamic typing. To…
Re: PyPy.js: Now faster than CPython
#68Earlier quoted context omitted.
Stackless Python has very clean and efficient concurency primitives, something lot of people dont seem to know..
> Stackless Python has very clean and efficient concurency primitives, .... Sounds like a good topic for a post (or at least a link - hint, hint).
Re: PyPy.js: Now faster than CPython
#69Earlier quoted context omitted.
I really don't understand this obsession with anonymous functions. If you're doing anything longer than one line, there is absolutely no reason why you should be sticking the entire function definition as a parameter. I've had great usage from Javascript where I have separate functions with proper names and formatting, and then pass a reference to them into the code that asks for them. Can someone please enlighten me…
I suggest you read SICP and gain an appreciation for higher-order functions. Once you do, you will probably have answered your own question. http://mitpress.mit.edu/sicp/
The OP is complaining about lambda functions in Python.
Re: PyPy.js: Now faster than CPython
#70I felt it was a grave mistake for Python to direct the community effort into backwards incomparable Python 3, rather than on focusing on the speed (and better profiling instrumentation) of Python 2 (perhaps adding a standard JIT compiler). As a result, had our company started now, we would have written our Twisted server in C or Go instead of Python like we did.
Did you consider PyPy? It kinda works and it kinda focuses effort on being a faster replacement.