Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
Friday, April 13, 2012
Slide 2
Slide 2 text
Hit me with questions as we go Friday, April 13, 2012
Slide 3
Slide 3 text
Building fast VMs quickly Alex Gaynor Friday, April 13, 2012
Slide 4
Slide 4 text
Building high performance VMs for dynamically typed languages is hard Friday, April 13, 2012
Slide 5
Slide 5 text
It doesn’t have to be Friday, April 13, 2012
Slide 6
Slide 6 text
PyPy A framework for implementing high performance dynamic languages A Python implementation built on this framework Friday, April 13, 2012
Slide 7
Slide 7 text
Architecture of a VM Tokenize Parse AST construction Bytecode compilation Interpretation Friday, April 13, 2012
Slide 8
Slide 8 text
Let’s build a VM Friday, April 13, 2012
Slide 9
Slide 9 text
https://bitbucket.org/ alex_gaynor/example-vm/ Friday, April 13, 2012
Slide 10
Slide 10 text
Our language Approximately a subset of Javascript Variables Floats, bools Arithmetic if, while, print Friday, April 13, 2012
Slide 11
Slide 11 text
Lexing and Parsing Write a grammar in EBNF That’s it Friday, April 13, 2012
Slide 12
Slide 12 text
AST Construction Take a tree of syntax nodes, turn them into semantic nodes Friday, April 13, 2012
Slide 13
Slide 13 text
Bytecode compilation Turn the AST into a bytecode. Friday, April 13, 2012
Slide 14
Slide 14 text
Object model How you represent your objects. Friday, April 13, 2012
Slide 15
Slide 15 text
Interpreter Simple bytecode interpreter. Friday, April 13, 2012
Slide 16
Slide 16 text
RPythonize and JIT Friday, April 13, 2012
Slide 17
Slide 17 text
That’s all folks! Thanks to Professor Moorthy Everyone in RCOS Friday, April 13, 2012