AmsterdamPHP Talk 15-05-2014: Compilers!

Опубликовано: 01 Июль 2026
на канале: AmsterdamPHP
348
3

Talk: JIT Compilers

The alternative PHP engine by Facebook (HHVM) and many Javascript engines use Just-In-Time (JIT) compilers to turn user space scripts into native executable code that runs directly on the CPU. Even the original Zend engine now has an experimental branche (PHPNG) in which JIT technologies are being used to speed up PHP.

How does this work under the hood? Emiel Bruijntjes gives a crash course 'how to write your own compiler' in which the whole process from writing a tokenizer and a parser, building an abstract syntax tree up to generating machine instructions is being explained. These concepts are demonstrated with a simple compiler that turns Smarty/Twig template files into native machine instructions.

Speaker: Emiel Bruijntjes

Emiel Bruijntjes lives in Amsterdam and is a member and frequent visitor of the PHP Amsterdam user group. In 2013 he initiated the open source PHP-CPP project to create a bridge between PHP and C++, and is CTO of Copernica BV. He studied computer science at the Vrije Universiteit in Amsterdam.