Compiling and Optimizing Scripting Languages
Why Hacker News recommends it
Cited in PHP compiler and language-implementation discussions as an honest account of the real difficulties of compiling dynamic languages.
What it is
Paul Biggar's Google Tech Talk on compiling and optimizing scripting languages, drawn from his work on the phc ahead-of-time PHP compiler. He covers runtime typing, aliasing and code generation challenges, and argues AOT can compete with JIT.
Recommended by 1 HN commenters across 1 different months, 2011 to 2020.
What Hacker News said
Recommends sgrove · 2016-12 · on “Nectar: A Native JavaScript Compiler Inspired by Crystal Lang and Nim Lang”
There's actually a not-too-terrible talk going over some of the challenges of compiling PHP, and how initial promising gains turn out to be very difficult (as OP said) to maintain as you try to encompass the full language. Some great examples of disappointments and challenges! [this video]
Cites nickik · 2011-12 · on “Facebook releases HHVM, 60 percent faster than its current PHP interpreter”
I think its importend to ask everything in these threads. I often find intressting questions answer in these threads (on reddit too). For JIT fans I recomend online-stalking of Mike Pall, here on Hacker News and on reddit. Well I think if you have a task like that a team should look into what other people where doing. Self, LuaJit, parrot, some smalltalk systems, strongtalk where all allready done or on the way in 2008. In a talk about phc ( [this video] ) Paul Biggar talk about why AOT might be better then JIT. His reasoning was that the suffer from bad startup times and php is a language where the comon uscase are scripts that only run a short time. Anyway the static compiler certantly wasn't a
Cites agumonkey · 2012-09 · on “PHP gets Generators”
I meant mine obviously ;) For the curious, here's the talk (1 hour) about ahead of time compilation of PHP: [this video]
Cites ook · 2020-11 · on “Why Dark didn't choose Rust”
[LINK] - "Design and implementation of an ahead-of-time compiler for PHP" is the PhD thesis in question. A google tech talk related to this work is on youtube [this video] You can find multiple other papers on google scholar where Paul was an author all related to programming languages, compilers etc.