
Let's Write an LLVM Specializer for Python (2015) - Cieplak
http://dev.stephendiehl.com/numpile/
======
kiriliponi
I recommand David Beazley's talk from a recent PyCon India on a similar
subject : [https://youtu.be/r-A78RgMhZU](https://youtu.be/r-A78RgMhZU)

Mostly live coded, it really is pretty amazing but also quite insightful.

~~~
heinrichhartman
> In this talk, I live-code a simple stack machine and turn it into an
> interpreter capable of running Web Assembly. I then use that to play a game
> written in Rust.

Wow. This is mind blowing. Thanks for the pointer.

~~~
bgilroy26
He has a lambda calculus talk in python[0] that is just as good. Just a great
educator.

[0]
[https://www.youtube.com/watch?v=pkCLMl0e_0k](https://www.youtube.com/watch?v=pkCLMl0e_0k)

~~~
raincom
U of Chicago, I believe, denied him tenure, when he was an assistant prof
there.

~~~
jules
How good of an educator you are may not even be in the top 5 most important
things to get tenure, unfortunately.

------
shalabhc
If you like this you might also like
[http://terralang.org](http://terralang.org)

~~~
weberc2
Whoa, I've had this idea kicking around in my mind for a looong time
(specifically something for dynamically generating Go code). Was wondering if
anyone actually built this out, but could never find anything. Thanks for
sharing!

------
saagarjha
Cool! Aside from the Python JIT portion, this was a pretty decent dive into
LLVM. One question: was this a notebook, or it it just CSS that's making the
code look like that?

~~~
yorwba
It's this Jupyter notebook:
[https://github.com/sdiehl/numpile/blob/master/Let's%20Write%...](https://github.com/sdiehl/numpile/blob/master/Let's%20Write%20an%20LLVM%20Specializer%20for%20Python!%20\(Stephen%20Diehl\).ipynb)

------
gjvc
As others have noted, this is a somewhat dated article. Indeed, the github
page for llvmpy
([https://github.com/llvmpy/llvmpy](https://github.com/llvmpy/llvmpy))
recommends to use llvmlite
([https://github.com/numba/llvmlite](https://github.com/numba/llvmlite))
instead.

See also [http://llvmlite.pydata.org/en/latest/user-
guide/index.html](http://llvmlite.pydata.org/en/latest/user-guide/index.html)
and in the context of the original article, in particular these two pages:

[http://llvmlite.pydata.org/en/latest/user-
guide/ir/examples....](http://llvmlite.pydata.org/en/latest/user-
guide/ir/examples.html)

[http://llvmlite.pydata.org/en/latest/user-
guide/binding/exam...](http://llvmlite.pydata.org/en/latest/user-
guide/binding/examples.html)

Hope this helps! :-)

------
dang
A thread from 2016:
[https://news.ycombinator.com/item?id=12063808](https://news.ycombinator.com/item?id=12063808)

Discussed at the time:
[https://news.ycombinator.com/item?id=8929040](https://news.ycombinator.com/item?id=8929040)

------
pulse7
Nice, compressed LLVM overview...

------
underdeserver
Anyone got a benchmark for the LLVM'd code?

------
accnumnplus1
Am I being daft, or is there not much sbout specializers on the web? Any links
much appreciated.

------
wenning
I'm wonder why llvmpy depends on llvm3.2 or 3.3, it's so a lot behind current
version.

~~~
hsaliak
The article is from 2015. Many of the jits (eg numba) have moved to llvmlite.

[https://github.com/numba/llvmlite](https://github.com/numba/llvmlite)

------
sergius
Why not just use Nim?

~~~
sigzero
I like Nim. I am learning it now. However, Nim is not Python and this post is
about Python.

