how to evaluate the performance of gradual type systems
play

How to Evaluate the Performance of Gradual Type Systems Ben Greenman - PowerPoint PPT Presentation

How to Evaluate the Performance of Gradual Type Systems Ben Greenman Asumu Takikawa Max S. New Daniel Feltey Robert Bruce Findler Jan Vitek Matthias Felleisen 1 Contribution: Our paper presents the first systematic method to measure the


  1. How to Evaluate the Performance of Gradual Type Systems Ben Greenman Asumu Takikawa Max S. New Daniel Feltey Robert Bruce Findler Jan Vitek Matthias Felleisen 1

  2. Contribution: Our paper presents the first systematic method to measure the performance implications of a gradual typing system. 2

  3. Notation Program Component Dependency 3

  4. Gradual Typing Mixed-Typed Program Statically-typed Component Dynamically-typed Component Type Boundary 4

  5. Typed-Untyped Interaction 5

  6. Typed-Untyped Interaction need Integer 6

  7. Typed-Untyped Interaction need Integer 42 7

  8. Typed-Untyped Interaction need Integer 42 8

  9. Typed-Untyped Interaction 9

  10. Typed-Untyped Interaction need Integer 1 �

  11. Typed-Untyped Interaction need Integer "NaN" 11

  12. Typed-Untyped Interaction need Integer "NaN" 12

  13. Typed-Untyped Interaction 13

  14. Typed-Untyped Interaction need Listof(String) 14

  15. Typed-Untyped Interaction need Listof(String) (list "A" "B" 27) 15

  16. Typed-Untyped Interaction need Listof(String) (list "A" "B" 27) 16

  17. Typed-Untyped Interaction 17

  18. Typed-Untyped Interaction need Bool->Bool 18

  19. Typed-Untyped Interaction need Bool->Bool #<procedure> 19

  20. Typed-Untyped Interaction need Bool->Bool #<procedure> Bool? 2 �

  21. Typed-Untyped Interaction Type boundaries impose a run-time cost! (Some mixed-typed languages do not enforce types. For these languages, the performance of type boundaries is not an issue.) 21

  22. 22

  23. Q. What is the overall cost of boundaries in a gradual typing system ? 23

  24. Q. What is the overall cost of boundaries in a gradual typing system ? Need a method to measure and evaluate the performance implications of a gradual typing system 24

  25. The Method 25

  26. 26

  27. 529 ms 602 ms 829,048 ms 821,285 ms 891 ms 829,779 ms 963 ms 575 ms 711,000 ms 721,454 592 ms 709,770 ms 716,637 ms 560 ms 548 ms 27

  28. 1x 28

  29. 0.97x 1x 1,512x 1,498x 1x 1,527x 1,513x 1x 1x 1,297x 1x 1,294x 1,307x 1x 1x 29

  30. 0.97x 1x 1,512x 1,498x 1x 1,527x 1,513x 1x 1x 1,297x 1x 1,294x 1,307x 1x 1x 3 �

  31. D-deliverable A configuration is D -deliverable if its performance is no worse than a factor of D slowdown compared to the baseline and D + 31

  32. Method: exhaustive perf. eval. 1. Typed program 2. Measure all configurations 3. Count D -deliverable cfgs. + Repeat for other programs 32

  33. A Method for Presenting the Data 33

  34. + D 34

  35. 100% + 0% 1 X>1 D 35

  36. 100% + 0% 1 20 D 36

  37. 100% + 0% 1 20 D 37

  38. Scaling the Method 38

  39. Exponential Blowup 39

  40. Exponential Blowup N components => 2 N configurations 4 �

  41. Simple Random Sampling 41

  42. Simple Random Sampling 1. Sample O(N) configurations N = number of components 42

  43. Simple Random Sampling 1. Sample O(N) configurations N = number of components 2. Count D -deliverable cfgs. in the sample + 43

  44. More in Paper 44

  45. • justification for O(N) sampling ∘ N = number of components • exhaustive method applied to Typed Racket ∘ 20 benchmarks, docs.racket-lang.org/gtp-benchmarks • comparison: TR v6.2, v6.3, & v6.4 ∘ the method quantifies improvements • discussion of pathologies 45

  46. Thank you Sam Tobin-Hochstadt For Typed Racket, and for significant improvements to v6.3, v6.4, and beyond. 46

  47. How to Evaluate the Performance of Gradual Type Systems Ben Greenman * Asumu Takikawa Max S. New Daniel Feltey Robert Bruce Findler Jan Vitek Matthias Felleisen 47

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend