Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Pycket: A Tracing JIT for a Functional Language (lambda-the-ultimate.org)
66 points by gkuan on May 14, 2015 | hide | past | favorite | 7 comments


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


Very 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).


If 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.


How does the optimisation of closures translate down to the machine level in Pycket?


I 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!


You 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.


Well 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

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: