Save 37% off PRO during our Black Friday Sale! »

Ruby Lugdunum 2012: Message in a Bottle

Ruby Lugdunum 2012: Message in a Bottle

5c2b452f6eea4a6d84c105ebd971d2a4?s=128

Konstantin Haase

June 23, 2012
Tweet

Transcript

  1. MESSAGE IN A BOTTLE Konstantin Haase Ruby Lugdunum June 23,

    2012
  2. @konstantinhaase (I’m sorry about that) rkh on github

  3. Sinatra Rack, Tilt, Rubinius, ...

  4. None
  5. None
  6. None
  7. None
  8. None
  9. None
  10. Ruby 1.8 is slow because it's interpreted.

  11. Surprise! Ruby 1.9 is interpreted, too.

  12. THANKS

  13. Ruby

  14. Internals

  15. Performance

  16. None
  17. RubyMotion

  18. WHAT WE’LL LOOK INTO MRI: method dispatch and execution Rubinius:

    inline caches and JIT JRuby: invokedynamic
  19. None
  20. THEY JUST LOVE BYTECODE

  21. None
  22. MRI

  23. Rubinius

  24. JRuby (JVM 1.6)

  25. None
  26. Source Code Parser Parse Tree Interpreter Bytecode Compiler Bytecode Interpreter

    JIT Machine Code CPU VM
  27. THE PLAN Find Method Execute Method

  28. Performance

  29. HOW TO SPEED UP? Find Method Faster Execute Method Faster

  30. FIND FASTER Inline Cache (aka Call/ Send Site Cache) Lookup

    Cache Inlining
  31. EXECUTE FASTER Reduce operations Just-in-time compilation Speed up search

  32. None
  33. rb_method_entry rb_method_entry_without_cache search_method

  34. None
  35. None
  36. None
  37. None
  38. None
  39. None
  40. None
  41. None
  42. None
  43. None
  44. None
  45. None
  46. None
  47. SPECIALIZED METHODS cached bytecode code with breakpoints specialized for arguments

    JITed code
  48. None
  49. None
  50. None
  51. None
  52. None
  53. None
  54. None
  55. Process invokedynamic JVM method bootstrap guard fallback

  56. None
  57. THANKS