Hacker News new | ask | show | jobs
by maximilianburke 1261 days ago
I recall that Google had a project to compile Python to LLVM (Unladen Swallow @ https://code.google.com/archive/p/unladen-swallow/), but work stopped on it a long time ago.

If I recall it really wasn't that much faster than CPython given the overhead, but it's been a long time; if it was faster I assume it wouldn't have been abandoned.

2 comments

I think the main difference is that this doesn’t purport to be a drop in replacement. also, they seem to be doing some multithreading.
Quite. Unladen Swallow was unfortunately a failure, in part because LLVM at the time was quite buggy, and in part because LLVM wasn't (isn't?) magic enough to speed up a dynamic language.

The blog post here mentions they do their own optimization passes, before handing over to LLVM. I imagine that's pretty important.

LLVM really wasn't that buggy at the time (circa 2009); the project I was using it for at the time, a .NET compiler that targeted video game consoles, was quite stable from a code generation point of view, and we were shipping games with it.
Ah, that's cool. Thanks for the correction. I was misremembering the Unladen Swallow retrospective[1]. It's fair to say they used a lot fo their available time contributing to LLVM, but it sounds like that was feature work, not bug focused.

[1] https://qinsb.blogspot.com/2011/03/unladen-swallow-retrospec...