Performance Evaluation for Gradual Typing Asumu Takikawa Daniel - - PowerPoint PPT Presentation

performance evaluation for gradual typing
SMART_READER_LITE
LIVE PREVIEW

Performance Evaluation for Gradual Typing Asumu Takikawa Daniel - - PowerPoint PPT Presentation

Performance Evaluation for Gradual Typing Asumu Takikawa Daniel Feltey *Ben Greenman Max S. New Jan Vitek Matthias Felleisen 9 years of sound gradual typing Gradual Typing for Functional Languages, Jeremy Siek & Walid Taha. SFP '06


slide-1
SLIDE 1

Performance Evaluation for Gradual Typing

Asumu Takikawa *Ben Greenman Jan Vitek Daniel Feltey Max S. New Matthias Felleisen

slide-2
SLIDE 2

9 years of sound gradual typing

Gradual Typing for Functional Languages, Jeremy Siek & Walid Taha. SFP '06 Interlanguage Migration: From Scripts to Programs, Sam Tobin-Hochstadt & Matthias Felleisen. OOPSLA '06

slide-3
SLIDE 3

9 years of sound gradual typing

Micro Macro

slide-4
SLIDE 4
  • focus on single-module programs
  • type system catches incompatibilities
  • all values implicitly type DYN

Micro

slide-5
SLIDE 5

Macro

  • multi-module, untyped programs
  • eliminate a class of errors
  • each module fully typed/untyped
slide-6
SLIDE 6

SFP'06

9 years of sound gradual typing

POPL'07 ECOOP'07 DLS'08 ESOP'09 SAC'09 POPL'08 OOPSLA'06 SFP'07 ICFP'09

Over 50 publications since 2006

http://github.com/samth/gradual-typing-bib

ML'07 ECOOP'08 OOPSLA'09 STOP'09 POPL'10 FOOL'10 ECOOP'10 POPL'10 PLDI'11 ECOOP'11 POPL'12 ESOP'12 SFP'12 OOPSLA'12 ECOOP'15 ICFP'14 DLS'13 POPL'15 OOPSLA'14 ECOOP'15 ESOP'13

slide-7
SLIDE 7

Performance?

slide-8
SLIDE 8

Performance?

10x 4x 22x 33x

slide-9
SLIDE 9

9 years of publications and nobody publishes evaluations because performance sucks

slide-10
SLIDE 10

Gradual Typing ... is practical?

slide-11
SLIDE 11

Gradual Typing ... is practical?

slide-12
SLIDE 12

Performance? Soundness?

slide-13
SLIDE 13

Types without Soundness

  • catch "obvious" logical errors
  • serve as documentation
  • may not be correct, or complete
slide-14
SLIDE 14

eliminate a class of errors from typed code

!

Types + Soundness typed

slide-15
SLIDE 15

Rests on an untyped runtime Every typed language...

slide-16
SLIDE 16

Option 1: Trusted Computing Base

(Bogus)

slide-17
SLIDE 17

Option 2: Check Everything

(Safe & very slow)

slide-18
SLIDE 18

Types + Soundness (revised) eliminate a class of errors from typed code identify errors at typed-untyped boundaries

slide-19
SLIDE 19

Option 1: Trusted Computing Base Option 2: Check Everything

slide-20
SLIDE 20

The Reality of (Macro) Gradual Typing

slide-21
SLIDE 21

The Reality of (Macro) Gradual Typing

slide-22
SLIDE 22

The Reality of (Macro) Gradual Typing

slide-23
SLIDE 23

The Reality of (Macro) Gradual Typing

slide-24
SLIDE 24

The Reality of (Macro) Gradual Typing

slide-25
SLIDE 25

The Reality of (Macro) Gradual Typing

slide-26
SLIDE 26

The Reality of (Macro) Gradual Typing

slide-27
SLIDE 27

Recap

  • Gradual type systems have "bad" performance
  • Type soundness is imperative
  • Issue: typed-untyped boundaries
slide-28
SLIDE 28

The Reality of (Macro) Gradual Typing

slide-29
SLIDE 29

The Reality of (Macro) Gradual Typing

slide-30
SLIDE 30

The Reality of (Macro) Gradual Typing

?

slide-31
SLIDE 31

Proposal

  • I. Define "boundary"
  • II. Run the entire lattice
  • III. Define "performant"
  • IV. Report the % of performant variations
slide-32
SLIDE 32

To be continued...

If you disagree, then propose an alternative Bottom line: no more "footnotes" on performance! If you agree, then use our framework

slide-33
SLIDE 33
slide-34
SLIDE 34

How to Scale?

  • Hire a cluster
  • Random sampling
  • Offer fewer configurations
  • Tools to identify / exclude configs.
slide-35
SLIDE 35

Gradual Typing: Promise Expressive Performant Sound

slide-36
SLIDE 36

Boundaries

Integer, please 2 Here! Thanks!

slide-37
SLIDE 37

Boundaries

Integer, please lol Here! TYPE ERROR

slide-38
SLIDE 38

Boundaries

List of Integer, please [ 2 , 2 , 2 ] Here! Thanks!

slide-39
SLIDE 39

Boundaries

Use it well ... + Function, please

slide-40
SLIDE 40
slide-41
SLIDE 41

Reinheitsgebot

1 barrel of wine + 1 teaspoon of sewage = 1 barrel of sewage