Fast enough VMs in fast enough time Laurence Tratt Software - - PowerPoint PPT Presentation

fast enough vms in fast enough time
SMART_READER_LITE
LIVE PREVIEW

Fast enough VMs in fast enough time Laurence Tratt Software - - PowerPoint PPT Presentation

Fast enough VMs in fast enough time Laurence Tratt Software Development Team 2016-02-04 1 / 26 http://soft-dev.org/ Language designers dilemma Language designers dilemma 2 / 26 http://soft-dev.org/ Language designers dilemma Language


slide-1
SLIDE 1

Fast enough VMs in fast enough time

Laurence Tratt

Software Development Team 2016-02-04

1 / 26 http://soft-dev.org/

slide-2
SLIDE 2

Language designers dilemma Language designers dilemma

2 / 26 http://soft-dev.org/

slide-3
SLIDE 3

Language designers dilemma Language designers dilemma

Implementation Effort

2 / 26 http://soft-dev.org/

slide-4
SLIDE 4

Language designers dilemma Language designers dilemma

Implementation Effort

Less T

  • o slow

2 / 26 http://soft-dev.org/

slide-5
SLIDE 5

Language designers dilemma Language designers dilemma

Implementation Effort

More Less T

  • o slow

Design suffers

2 / 26 http://soft-dev.org/

slide-6
SLIDE 6

The traditional routes The traditional routes

Efficiency Difficulty

3 / 26 http://soft-dev.org/

slide-7
SLIDE 7

The traditional routes The traditional routes

Efficiency Difficulty AST interpreter

3 / 26 http://soft-dev.org/

slide-8
SLIDE 8

The traditional routes The traditional routes

Efficiency Difficulty AST interpreter Translation

3 / 26 http://soft-dev.org/

slide-9
SLIDE 9

The traditional routes The traditional routes

Efficiency Difficulty AST interpreter Translation (static content) Translation (dynamic content)

3 / 26 http://soft-dev.org/

slide-10
SLIDE 10

The traditional routes The traditional routes

Efficiency Difficulty AST interpreter Off the shelf VM Translation (static content) Translation (dynamic content)

3 / 26 http://soft-dev.org/

slide-11
SLIDE 11

The traditional routes The traditional routes

Efficiency Difficulty Off the shelf VM

3 / 26 http://soft-dev.org/

slide-12
SLIDE 12

The traditional routes The traditional routes

Efficiency Difficulty Off the shelf VM (semantic match) Off the shelf VM (semantic mismatch)

3 / 26 http://soft-dev.org/

slide-13
SLIDE 13

The traditional routes The traditional routes

Efficiency Difficulty Off the shelf VM (semantic match) Off the shelf VM (semantic mismatch) Home brew VM

3 / 26 http://soft-dev.org/

slide-14
SLIDE 14

JIT compiled VM components JIT compiled VM components

Interpreter JIT

  • 1. Start
  • 2. Detect hot method
  • 3. Convert to machine

code

4 / 26 http://soft-dev.org/

slide-15
SLIDE 15

JIT compiled VM issues JIT compiled VM issues

Interpreter JIT

ffi ffi

5 / 26 http://soft-dev.org/

slide-16
SLIDE 16

JIT compiled VM issues JIT compiled VM issues

Interpreter JIT Interpreter JIT

+

  • Easy to write

Slow ffi ffi

5 / 26 http://soft-dev.org/

slide-17
SLIDE 17

JIT compiled VM issues JIT compiled VM issues

Interpreter JIT Interpreter JIT

+

  • Easy to write

Slow

Interpreter JIT

+

  • Easy to write

Slow +

  • Fast

Difficult to write ffi

5 / 26 http://soft-dev.org/

slide-18
SLIDE 18

JIT compiled VM issues JIT compiled VM issues

Interpreter JIT Interpreter JIT

+

  • Easy to write

Slow

Interpreter JIT

+

  • Easy to write

Slow +

  • Fast

Difficult to write

Interpreter JIT

+

  • Easy to write

Slow +

  • Fast

Difficult to write

}

Interpreter and JIT must be kept in sync

5 / 26 http://soft-dev.org/

slide-19
SLIDE 19

Build your own JIT compiler? Build your own JIT compiler?

Building JIT compiled VMs is hard

6 / 26 http://soft-dev.org/

slide-20
SLIDE 20

Meta-tracing translation with RPython Meta-tracing translation with RPython

Interpreter

7 / 26 http://soft-dev.org/

slide-21
SLIDE 21

Meta-tracing translation with RPython Meta-tracing translation with RPython

Interpreter

RPython translator

7 / 26 http://soft-dev.org/

slide-22
SLIDE 22

Meta-tracing translation with RPython Meta-tracing translation with RPython

Interpreter Optimised Interpreter JIT

RPython translator

7 / 26 http://soft-dev.org/

slide-23
SLIDE 23

Meta-tracing translation with RPython Meta-tracing translation with RPython

Interpreter Optimised Interpreter JIT

RPython translator

7 / 26 http://soft-dev.org/

slide-24
SLIDE 24

Meta-tracing translation with RPython Meta-tracing translation with RPython

Interpreter Optimised Interpreter JIT

RPython translator

7 / 26 http://soft-dev.org/

slide-25
SLIDE 25

Adding a JIT to an RPython interpreter Adding a JIT to an RPython interpreter

... pc := 0 while 1: instr := load_next_instruction(pc) if instr == POP: stack.pop() pc += 1 elif instr == BRANCH:

  • ff = load_branch_jump(pc)

pc += off elif ...: ...

Observation: interpreters are big loops.

8 / 26 http://soft-dev.org/

slide-26
SLIDE 26

Adding a JIT to an RPython interpreter Adding a JIT to an RPython interpreter

... pc := 0 while 1: jit_merge_point(pc) instr := load_next_instruction(pc) if instr == POP: stack.pop() pc += 1 elif instr == BRANCH:

  • ff = load_branch_jump(pc)

if off < 0: can_enter_jit(pc) pc += off elif ...: ...

Observation: interpreters are big loops.

8 / 26 http://soft-dev.org/

slide-27
SLIDE 27

RPython translation RPython translation

Interpreter Optimised Interpreter JIT

RPython translator

9 / 26 http://soft-dev.org/

slide-28
SLIDE 28

RPython translation RPython translation

Interpreter Language Interpreter Trace Interpreter

RPython translator

9 / 26 http://soft-dev.org/

slide-29
SLIDE 29

Tracing JIT compilers Tracing JIT compilers

User program (lang FL)

if x < 0: x = x + 1 else: x = x + 2 x = x + 3

10 / 26 http://soft-dev.org/

slide-30
SLIDE 30

Tracing JIT compilers Tracing JIT compilers

User program (lang FL) Trace when x is set to 6

if x < 0: x = x + 1 else: x = x + 2 x = x + 3 guard_type(x, int) guard_not_less_than(x, 0) guard_type(x, int) x = int_add(x, 2) guard_type(x, int) x = int_add(x, 3)

10 / 26 http://soft-dev.org/

slide-31
SLIDE 31

A tracing system’s states A tracing system’s states

11 / 26 http://soft-dev.org/

slide-32
SLIDE 32

A tracing system’s states A tracing system’s states Trace

New hot loop

11 / 26 http://soft-dev.org/

slide-33
SLIDE 33

A tracing system’s states A tracing system’s states Trace

New hot loop

Trace Optimise

New hot loop

11 / 26 http://soft-dev.org/

slide-34
SLIDE 34

A tracing system’s states A tracing system’s states Trace

New hot loop

Trace Optimise

New hot loop

Trace Run trace Optimise

New hot loop

11 / 26 http://soft-dev.org/

slide-35
SLIDE 35

A tracing system’s states A tracing system’s states Trace

New hot loop

Trace Optimise

New hot loop

Trace Run trace Optimise

New hot loop

Trace Run trace Optimise

New hot loop Old hot loop

11 / 26 http://soft-dev.org/

slide-36
SLIDE 36

A tracing system’s states A tracing system’s states Trace

New hot loop

Trace Optimise

New hot loop

Trace Run trace Optimise

New hot loop

Trace Run trace Optimise

New hot loop Old hot loop

Trace Run trace Optimise

New hot loop Old hot loop Guard fails

11 / 26 http://soft-dev.org/

slide-37
SLIDE 37

A tracing system’s states A tracing system’s states Trace

New hot loop

Trace Optimise

New hot loop

Trace Run trace Optimise

New hot loop

Trace Run trace Optimise

New hot loop Old hot loop

Trace Run trace Optimise

New hot loop Old hot loop Guard fails

Trace Run trace Optimise

New hot loop Old hot loop Guard fails Repeated guard fail

11 / 26 http://soft-dev.org/

slide-38
SLIDE 38

Trace optimisations (1) Trace optimisations (1)

1 Reuse typical compiler optimisations.

12 / 26 http://soft-dev.org/

slide-39
SLIDE 39

Tracing JIT compilers Tracing JIT compilers

User program (lang FL) Trace when x is set to 6

if x < 0: x = x + 1 else: x = x + 2 x = x + 3 guard_type(x, int) guard_not_less_than(x, 0) guard_type(x, int) x = int_add(x, 2) guard_type(x, int) x = int_add(x, 3)

13 / 26 http://soft-dev.org/

slide-40
SLIDE 40

Tracing JIT compilers Tracing JIT compilers

User program (lang FL) Optimised trace

if x < 0: x = x + 1 else: x = x + 2 x = x + 3 guard_type(x, int) guard_not_less_than(x, 0) x = int_add(x, 5)

13 / 26 http://soft-dev.org/

slide-41
SLIDE 41

Meta-tracing VM components Meta-tracing VM components

Language Interpreter Trace Interpreter

  • 1. Start
  • 2. Detect hot loop
  • 3. Execute and trace
  • 4. Convert trace to

machine code

14 / 26 http://soft-dev.org/

slide-42
SLIDE 42

Meta-tracing JITs Meta-tracing JITs

FL Interpreter

program_counter = 0; stack = [] vars = {...} while True: jit_merge_point(program_counter) instr = load_instruction(program_counter) if instr == INSTR_VAR_GET: stack.push( vars[read_var_name_from_instruction()]) program_counter += 1 elif instr == INSTR_VAR_SET: vars[read_var_name_from_instruction()] = stack.pop() program_counter += 1 elif instr == INSTR_INT: stack.push(read_int_from_instruction()) program_counter += 1 elif instr == INSTR_LESS_THAN: rhs = stack.pop() lhs = stack.pop() if isinstance(lhs, int) and isinstance(rhs, int): if lhs < rhs: stack.push(True) else: stack.push(False) else: ... program_counter += 1 elif instr == INSTR_IF: result = stack.pop() if result == True: program_counter += 1 else: program_counter += read_jump_if_instruction() elif instr == INSTR_ADD: lhs = stack.pop() rhs = stack.pop() if isinstance(lhs, int) and isinstance(rhs, int): stack.push(lhs + rhs) else: ... program_counter += 1 15 / 26 http://soft-dev.org/

slide-43
SLIDE 43

Meta-tracing JITs Meta-tracing JITs

FL Interpreter

program_counter = 0; stack = [] vars = {...} while True: jit_merge_point(program_counter) instr = load_instruction(program_counter) if instr == INSTR_VAR_GET: stack.push( vars[read_var_name_from_instruction()]) program_counter += 1 elif instr == INSTR_VAR_SET: vars[read_var_name_from_instruction()] = stack.pop() program_counter += 1 elif instr == INSTR_INT: stack.push(read_int_from_instruction()) program_counter += 1 elif instr == INSTR_LESS_THAN: rhs = stack.pop() lhs = stack.pop() if isinstance(lhs, int) and isinstance(rhs, int): if lhs < rhs: stack.push(True) else: stack.push(False) else: ... program_counter += 1 15 / 26 http://soft-dev.org/

slide-44
SLIDE 44

Meta-tracing JITs Meta-tracing JITs

FL Interpreter User program (lang FL)

program_counter = 0; stack = [] vars = {...} while True: jit_merge_point(program_counter) instr = load_instruction(program_counter) if instr == INSTR_VAR_GET: stack.push( vars[read_var_name_from_instruction()]) program_counter += 1 elif instr == INSTR_VAR_SET: vars[read_var_name_from_instruction()] = stack.pop() program_counter += 1 elif instr == INSTR_INT: stack.push(read_int_from_instruction()) program_counter += 1 elif instr == INSTR_LESS_THAN: rhs = stack.pop() lhs = stack.pop() if isinstance(lhs, int) and isinstance(rhs, int): if lhs < rhs: stack.push(True) else: stack.push(False) else: ... program_counter += 1 if x < 0: x = x + 1 else: x = x + 2 x = x + 3 15 / 26 http://soft-dev.org/

slide-45
SLIDE 45

Meta-tracing JITs Meta-tracing JITs

FL Interpreter Initial trace

program_counter = 0; stack = [] vars = {...} while True: jit_merge_point(program_counter) instr = load_instruction(program_counter) if instr == INSTR_VAR_GET: stack.push( vars[read_var_name_from_instruction()]) program_counter += 1 elif instr == INSTR_VAR_SET: vars[read_var_name_from_instruction()] = stack.pop() program_counter += 1 elif instr == INSTR_INT: stack.push(read_int_from_instruction()) program_counter += 1 elif instr == INSTR_LESS_THAN: rhs = stack.pop() lhs = stack.pop() if isinstance(lhs, int) and isinstance(rhs, int): if lhs < rhs: stack.push(True) else: stack.push(False) else: ... program_counter += 1 v0 = <program_counter> v1 = <stack> v2 = <vars> v3 = load_instruction(v0) guard_eq(v3, INSTR_VAR_GET) v4 = dict_get(v2, "x") list_append(v1, v4) v5 = add(v0, 1) v6 = load_instruction(v5) guard_eq(v6, INSTR_INT) list_append(v1, 0) v7 = add(v5, 1) v8 = load_instruction(v7) guard_eq(v8, INSTR_LESS_THAN) v9 = list_pop(v1) v10 = list_pop(v1) guard_type(v9, int) guard_type(v10, int) guard_not_less_than(v9, v10) list_append(v1, False) v11 = add(v7, 1) v12 = load_instruction(v11) guard_eq(v12, INSTR_IF) v13 = list_pop(v1) guard_false(v13) ... 15 / 26 http://soft-dev.org/

slide-46
SLIDE 46

Meta-tracing JITs Meta-tracing JITs

Initial trace in full

v0 = <program_counter> v1 = <stack> v2 = <vars> v3 = load_instruction(v0) guard_eq(v3, INSTR_VAR_GET) v4 = dict_get(v2, "x") list_append(v1, v4) v5 = add(v0, 1) v6 = load_instruction(v5) guard_eq(v6, INSTR_INT) list_append(v1, 0) v7 = add(v5, 1) v8 = load_instruction(v7) guard_eq(v8, INSTR_LESS_THAN) v9 = list_pop(v1) v10 = list_pop(v1) guard_type(v9, int) guard_type(v10, int) guard_not_less_than(v9, v10) list_append(v1, False) v11 = add(v7, 1) v12 = load_instruction(v11) guard_eq(v12, INSTR_IF) v13 = list_pop(v1) guard_false(v13) v14 = add(v11, 2) v15 = load_instruction(v14) guard_eq(v15, INSTR_VAR_GET) v16 = dict_get(v2, "x") list_append(v1, v16) v17 = add(v14, 1) v18 = load_instruction(v17) guard_eq(v18, INSTR_INT) list_append(v1, 2) v19 = add(v17, 1) v20 = load_instruction(v19) guard_eq(v20, INSTR_ADD) v21 = list_pop(v1) v22 = list_pop(v1) guard_type(v21, int) guard_type(v22, int) v23 = add(v22, v21) list_append(v1, v23) v24 = add(v19, 1) v25 = load_instruction(v24) guard_eq(v25, INSTR_VAR_SET) v26 = list_pop(v1) dict_set(v2, "x", v26) v27 = add(v24, 1) v28 = load_instruction(v27) guard_eq(v28, INSTR_VAR_GET) v29 = dict_get(v2, "x") list_append(v1, v29) v30 = add(v27, 1) v31 = load_instruction(v30) guard_eq(v31, INSTR_INT) list_append(v1, 3) v32 = add(v30, 1) v33 = load_instruction(v32) guard_eq(v33, INSTR_ADD) v34 = list_pop(v1) v35 = list_pop(v1) guard_type(v34, int) guard_type(v35, int) v36 = add(v35, v34) list_append(v1, v36) v37 = add(v32, 1) v38 = load_instruction(v37) guard_eq(v38, INSTR_VAR_SET) v39 = list_pop(v1) dict_set(v2, "x", v39) v40 = add(v37, 1) 15 / 26 http://soft-dev.org/

slide-47
SLIDE 47

Trace optimisation (1) Trace optimisation (1)

Removing constants (from jit_merge_point)

v1 = <stack> v2 = <vars> v4 = dict_get(v2, "x") list_append(v1, v4) list_append(v1, 0) v9 = list_pop(v1) v10 = list_pop(v1) guard_type(v9, int) guard_type(v10, int) guard_not_less_than(v9, v10) list_append(v1, False) v13 = list_pop(v1) guard_false(v13) v16 = dict_get(v2, "x") list_append(v1, v16) list_append(v1, 2) v21 = list_pop(v1) v22 = list_pop(v1) guard_type(v21, int) guard_type(v22, int) v23 = add(v22, v21) list_append(v1, v23) v26 = list_pop(v1) dict_set(v2, "x", v26) v29 = dict_get(v2, "x") list_append(v1, v29) list_append(v1, 3) v34 = list_pop(v1) v35 = list_pop(v1) guard_type(v34, int) guard_type(v35, int) v36 = add(v35, v34) list_append(v1, v36) v39 = list_pop(v1) dict_set(v2, "x", v39) 16 / 26 http://soft-dev.org/

slide-48
SLIDE 48

Optimisation #2 & #3 Optimisation #2 & #3

List folded trace

v1 = <stack> v2 = <vars> v4 = dict_get(v2, "x") guard_type(v4, int) guard_not_less_than(v4, 0) v16 = dict_get(v2, "x") guard_type(v16, int) v23 = add(v16, 2) dict_set(v2, "x", v23) v29 = dict_get(v2, "x") guard_type(v29, int) v36 = add(v29, 3) dict_set(v2, "x", v36) 17 / 26 http://soft-dev.org/

slide-49
SLIDE 49

Optimisation #2 & #3 Optimisation #2 & #3

List folded trace Dict folded trace

v1 = <stack> v2 = <vars> v4 = dict_get(v2, "x") guard_type(v4, int) guard_not_less_than(v4, 0) v16 = dict_get(v2, "x") guard_type(v16, int) v23 = add(v16, 2) dict_set(v2, "x", v23) v29 = dict_get(v2, "x") guard_type(v29, int) v36 = add(v29, 3) dict_set(v2, "x", v36) v1 = <stack> v2 = <vars> v4 = dict_get(v2, "x") guard_type(v4, int) guard_not_less_than(v4, 0) v23 = add(v4, 2) guard_type(v23, int) v36 = add(v23, 3) dict_set(v2, "x", v36) 17 / 26 http://soft-dev.org/

slide-50
SLIDE 50

Optimisation #4 & #5 Optimisation #4 & #5

Type folded trace

v1 = <stack> v2 = <vars> v4 = dict_get(v2, "x") guard_type(v4, int) guard_not_less_than(v4, 0) v23 = add(v4, 2) v36 = add(v23, 3) dict_set(v2, "x", v36) 18 / 26 http://soft-dev.org/

slide-51
SLIDE 51

Optimisation #4 & #5 Optimisation #4 & #5

Type folded trace Arithmetic folded trace

v1 = <stack> v2 = <vars> v4 = dict_get(v2, "x") guard_type(v4, int) guard_not_less_than(v4, 0) v23 = add(v4, 2) v36 = add(v23, 3) dict_set(v2, "x", v36) v1 = <stack> v2 = <vars> v4 = dict_get(v2, "x") guard_type(v4, int) guard_not_less_than(v4, 0) v23 = add(v4, 5) dict_set(v2, "x", v23) 18 / 26 http://soft-dev.org/

slide-52
SLIDE 52

Optimisation #4 & #5 Optimisation #4 & #5

Type folded trace Arithmetic folded trace

v1 = <stack> v2 = <vars> v4 = dict_get(v2, "x") guard_type(v4, int) guard_not_less_than(v4, 0) v23 = add(v4, 2) v36 = add(v23, 3) dict_set(v2, "x", v36) v1 = <stack> v2 = <vars> v4 = dict_get(v2, "x") guard_type(v4, int) guard_not_less_than(v4, 0) v23 = add(v4, 5) dict_set(v2, "x", v23)

Trace optimisation: from 72 trace elements to 7.

18 / 26 http://soft-dev.org/

slide-53
SLIDE 53

Trace optimisations (2) Trace optimisations (2)

1 Reuse typical compiler optimisations.

19 / 26 http://soft-dev.org/

slide-54
SLIDE 54

Trace optimisations (2) Trace optimisations (2)

1 Reuse typical compiler optimisations. 2 Make use of tracings natural tendency to inline.

19 / 26 http://soft-dev.org/

slide-55
SLIDE 55

Trace optimisations (2) Trace optimisations (2)

1 Reuse typical compiler optimisations. 2 Make use of tracings natural tendency to inline. 3 Insert language-specific hints.

19 / 26 http://soft-dev.org/

slide-56
SLIDE 56

Example: Language-Specific Runtime Feedback Example: Language-Specific Runtime Feedback

def lookup(cls, name): ... def call_method(obj, func_name, args): cls = obj.get_class() func = lookup(cls, func_name) return func.call(obj, args)

20 / 26 http://soft-dev.org/

slide-57
SLIDE 57

Example: Language-Specific Runtime Feedback Example: Language-Specific Runtime Feedback

def lookup(cls, name): ... def call_method(obj, func_name, args): cls = obj.get_class() promote(cls) func = lookup(cls, func_name) return func.call(obj, args)

20 / 26 http://soft-dev.org/

slide-58
SLIDE 58

Example: Language-Specific Runtime Feedback Example: Language-Specific Runtime Feedback

@elidable def lookup(cls, name): ... def call_method(obj, func_name, args): cls = obj.get_class() promote(cls) func = lookup(cls, func_name) return func.call(obj, args)

20 / 26 http://soft-dev.org/

slide-59
SLIDE 59

An RPython experiment An RPython experiment

21 / 26 http://soft-dev.org/

slide-60
SLIDE 60

An RPython experiment An RPython experiment A Converge VM in RPython.

21 / 26 http://soft-dev.org/

slide-61
SLIDE 61

An RPython experiment An RPython experiment A Converge VM in RPython. How hard can it be?

21 / 26 http://soft-dev.org/

slide-62
SLIDE 62

Converge 1 vs. Converge 2 VMs Converge 1 vs. Converge 2 VMs

Converge 1 Converge 2 Size (KLoc) Effort (person months) Performance

22 / 26 http://soft-dev.org/

slide-63
SLIDE 63

Converge 1 vs. Converge 2 VMs Converge 1 vs. Converge 2 VMs

Converge 1 Converge 2 Size (KLoc) 13 Effort (person months) Performance

22 / 26 http://soft-dev.org/

slide-64
SLIDE 64

Converge 1 vs. Converge 2 VMs Converge 1 vs. Converge 2 VMs

Converge 1 Converge 2 Size (KLoc) 13 5.5 Effort (person months) Performance

22 / 26 http://soft-dev.org/

slide-65
SLIDE 65

Converge 1 vs. Converge 2 VMs Converge 1 vs. Converge 2 VMs

Converge 1 Converge 2 Size (KLoc) 13 5.5 Effort (person months) 18 Performance

22 / 26 http://soft-dev.org/

slide-66
SLIDE 66

Converge 1 vs. Converge 2 VMs Converge 1 vs. Converge 2 VMs

Converge 1 Converge 2 Size (KLoc) 13 5.5 Effort (person months) 18 3 Performance

22 / 26 http://soft-dev.org/

slide-67
SLIDE 67

Converge 1 vs. Converge 2 VMs Converge 1 vs. Converge 2 VMs

Converge 1 Converge 2 Size (KLoc) 13 5.5 Effort (person months) 18 3 Performance x

22 / 26 http://soft-dev.org/

slide-68
SLIDE 68

Converge 1 vs. Converge 2 VMs Converge 1 vs. Converge 2 VMs

Converge 1 Converge 2 Size (KLoc) 13 5.5 Effort (person months) 18 3 Performance x 2-150x

22 / 26 http://soft-dev.org/

slide-69
SLIDE 69

PyPy: an industrial strength VM PyPy: an industrial strength VM

Converge 2 PyPy Size (KLoc) 5.5 60 (+190 for libraries) Effort (person months) 3 Performance x

23 / 26 http://soft-dev.org/

slide-70
SLIDE 70

PyPy: an industrial strength VM PyPy: an industrial strength VM

Converge 2 PyPy Size (KLoc) 5.5 60 (+190 for libraries) Effort (person months) 3 Performance x

23 / 26 http://soft-dev.org/

slide-71
SLIDE 71

PyPy: an industrial strength VM PyPy: an industrial strength VM

Converge 2 PyPy Size (KLoc) 5.5 60 (+190 for libraries) Effort (person months) 3 300 Performance x

23 / 26 http://soft-dev.org/

slide-72
SLIDE 72

PyPy: an industrial strength VM PyPy: an industrial strength VM

Converge 2 PyPy Size (KLoc) 5.5 60 (+190 for libraries) Effort (person months) 3 300 Performance x 3-5x

23 / 26 http://soft-dev.org/

slide-73
SLIDE 73

PyPy demo PyPy demo

24 / 26 http://soft-dev.org/

slide-74
SLIDE 74

Where we are now Where we are now + Get a good JIT compiler for very little effort.

25 / 26 http://soft-dev.org/

slide-75
SLIDE 75

Where we are now Where we are now + Get a good JIT compiler for very little effort.

  • RPython is... RPython.

25 / 26 http://soft-dev.org/

slide-76
SLIDE 76

Where we are now Where we are now + Get a good JIT compiler for very little effort.

  • RPython is... RPython.
  • Fairly poor warmup.

25 / 26 http://soft-dev.org/

slide-77
SLIDE 77

Where we are now Where we are now + Get a good JIT compiler for very little effort.

  • RPython is... RPython.
  • Fairly poor warmup.
  • Poor multi-threading support.

25 / 26 http://soft-dev.org/

slide-78
SLIDE 78

Summary Summary

26 / 26 http://soft-dev.org/

slide-79
SLIDE 79

Summary Summary

What language designers dilemma?

26 / 26 http://soft-dev.org/

slide-80
SLIDE 80

Summary Summary

Thank you for listening http://soft-dev.org/

26 / 26 http://soft-dev.org/