6 ms·
Pycket: A Tracing JIT for a Functional Language
- andrewchambers 11y agoPixie https://github.com/pixie-lang/pixie https://github.com/pixie-lang/pixie has a branch which intends to follow the design of this pycket VM. This will allows true tail calls in a clojure like language. Really exciting. https://github.com/pixie-lang/pixie/issues/312 https://github.com/pixie-lang/pixie/issues/312
- kbd 11y agoVery impressive that PyPy's JIT with Pycket out-performed Racket's language-specific JIT, and that it supports tail calls and continuations, both of which are impractical to implement on say, the JVM (see Clojure).
- sanxiyn 11y agoIf you read the paper, not only Pycket supports continuations, but it optimizes continuations better than Racket. To quote: "Since first-class continuations are difficult to implement in a mostly-C environment, two benchmarks which focus on this feature (ctak and fibc) perform very poorly on Racket and Bigloo, both of which implement continuations by copying the C stack." Racket actually isn't optimized for continuations-heavy codes, simply because such codes are rare in practice. Neither is Pycket, but design of Pycket is such that continuations optimize as well as normal calls without any special effort. The result is that for ctak and fibc, Pycket is more than 100 times(!) faster than Racket.
- btdollar 11y agoHow does the optimisation of closures translate down to the machine level in Pycket?
- 616c 11y agoI had trouble compiling Pixie a few weeks ago specifically because it tries to embed PyPy from source, IIRC, and I cold not figure out how to tell it to talk to the PyPy I had already compiled. Looks like I need to try again. And if this comes to Racket, this formidable stack will be unstoppabe!
- andrewchambers 11y agoYou have totally misunderstood what pypy and rpython are. Pixie is using the pypy toolchain to build a binary, the rpython toolchain to be precise. This is not the same as the pypy binary you have installed.
- 616c 11y agoWell thanks for clarifying. But my point is: cannot I use the already configured pypy toolchain I used to build pypy from source on my machine anyway? https://aur.archlinux.org/packages/?O=0&K=pypy https://aur.archlinux.org/packages/?O=0&K=pypy In any event, I will invest more time into this. All the talk of RPython, and (yes I know they are unrelated) Cython toolkits makes Python look wonderful again.