Rubinius 1.0 and more!

1,325 views
1,213 views

Published on

Features of Rubinius 1.0 and 1.1 discussed at RailsConf 2010.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,325
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide









































































































































  • Rubinius 1.0 and more!

    1. 1. Rubinius 1.0 and more!
    2. 2. X Phoeni factors
    3. 3. Rubinius Much more!
    4. 4. 1.0 Finally out! 12,206 commits
    5. 5. 1.0 1.8.7 compatible
    6. 6. 1.0 Good Performance
    7. 7. 1.0 Good Performance 20x faster than MRI sometimes
    8. 8. 1.0 Good Performance 10x slower in sometimes
    9. 9. 1.0 Good Performance Tools to help
    10. 10. Rubinius Why bother?
    11. 11. Rubinius Dogfood
    12. 12. Rubinius Ruby is currency
    13. 13. Rubinius C is opaque
    14. 14. Rubinius JIT loves Ruby
    15. 15. DataMapper Now Supported!
    16. 16. DataMapper Now Supported!
    17. 17. Information Geographics Now Supported!
    18. 18. NfoG Now Supported!
    19. 19. o/~ Data in your maps yo. Information Geo. o/~
    20. 20. NotImplementedError
    21. 21. NotImplementedError
    22. 22. Implemented
    23. 23. Implemented ObjectSpace
    24. 24. Implemented ObjectSpace _id2ref
    25. 25. Implemented ObjectSpace _id2ref - Slow
    26. 26. Implemented ObjectSpace _id2ref - Searches Heap
    27. 27. Implemented ObjectSpace each_object
    28. 28. Implemented ObjectSpace find_object([:kind_of, what], block)
    29. 29. Implemented ObjectSpace More Powerful API
    30. 30. Performance A “Hot” Topic
    31. 31. Performance Measure
    32. 32. Performance Measure Measure, measure, measure
    33. 33. Performance Measure Benchmark.measure
    34. 34. Performance Measure -Xprofile (1.0.1)
    35. 35. Performance Measure Sampling Profiler (1.1)
    36. 36. Performance Measure Demo
    37. 37. Debugger New / Old Feature
    38. 38. Debugger Inspect code
    39. 39. Debugger Inspect Code Code Split
    40. 40. Debugger Inspect Code VM integration
    41. 41. CompiledMethod#set_breakpoint Thread#set_debugger_thread Location#variables
    42. 42. Debugger Inspect Code debugger.rb
    43. 43. Debugger Inspect Code Write your own!
    44. 44. Memory Profiler (1.1)
    45. 45. Memory C-API hooks
    46. 46. Memory C-API hooks Write a memory profiler
    47. 47. Query Agent Know thy self
    48. 48. Query Agent know thy self VM API
    49. 49. Query Agent know thy self Export VM internal data
    50. 50. Query Agent know thy self Invaluable debugging tool
    51. 51. Query Agent know thy self Demo
    52. 52. Compliance C-API syck, nokogiri, etc.
    53. 53. Compliance C-API A few gotchas...
    54. 54. C Extension Do’s and Don’ts
    55. 55. Do prefer a function over an R*() macro
    56. 56. Rubinius RBASIC(obj)->class rb_obj_class(obj)
    57. 57. 1.9 / Rubinius ROBJECT(obj)->iv_tbl rb_ivar_[get|set](obj, ...)
    58. 58. 1.9 / Rubinius Don’t use the “re.h” header
    59. 59. 1.9 / Rubinius Don’t use the “env.h” header ruby_frame ruby_dyna_vars ruby_scope ruby_in_eval ruby_class
    60. 60. Try your gem
    61. 61. Report your problems!
    62. 62. http://github.com/ evanphx/rubinius/ issues
    63. 63. Performance
    64. 64. Performance The Two Fronts
    65. 65. Performance Why We Fight What We Write
    66. 66. (0..10).to_a.each do |i| ary << i end
    67. 67. 0.upto(10) do |i| ary << i end
    68. 68. Performance The Two Fronts How We Run It
    69. 69. Performance Benchmarking
    70. 70. Performance Benchmarking Expectations vs. Reality
    71. 71. Performance Benchmarking Lies, Damned Lies, and Statistics
    72. 72. Benchmarks
    73. 73. 114 Times faster than 1.8 100 86 71 57 43 29 14 0 ruby 1.9 jruby macruby rubinius
    74. 74. 57 Times faster than 1.8 50 43 36 29 21 14 7 0 ruby 1.9 jruby macruby rubinius
    75. 75. impl 1.8 1.9 jruby macruby rbx ms 309304 51113 113824 70580 24232 x faster 1.0 6.0 2.7 4.3 12.7
    76. 76. Benchmarks 12x faster!
    77. 77. Benchmarks 12x faster! On these benchmarks!
    78. 78. Benchmarks 12x faster! In general?
    79. 79. Benchmarks What did we benchmark?
    80. 80. Calling a method. Empty while loop. Creating a block. Accessing ivars. Performing ‘not’. Calling a polymorphic method. Calling super.
    81. 81. Benchmarks Why these things?
    82. 82. Benchmarks Why these things? How do these results translate?
    83. 83. Analogy
    84. 84. Dishonest?
    85. 85. Rubinius Ruby performance begets core performance
    86. 86. 1.8 Ruby performance begets ?
    87. 87. Benchmarks Need more/better data
    88. 88. def foo() ary = [] 100.times { |i| ary << i } end 300,000 times
    89. 89. Seconds 8 7.82 6 4 4.24 3.91 3.26 2.60 2 0 1.8 1.9 macruby jruby rbx
    90. 90. def foo() hsh = {} 100.times { |i| hsh[i] = 0 } end 100,000 times
    91. 91. Seconds 11 10.5 8.25 7.62 5.5 4.77 4.7 2.75 1.67 0 1.8 1.9 macruby jruby rbx
    92. 92. def foo() hsh = { 47 => true } 100.times { |i| hsh[i] } end 100,000 times
    93. 93. Seconds 4 3.64 3 2.61 2.6 2 2.12 1.75 1 0 1.8 1.9 macruby jruby rbx
    94. 94. Benchmarking Conclusion
    95. 95. Benchmarking Conclusion Rubinius is awesome at ruby code
    96. 96. Benchmarking Conclusion Comparing C/Java to Ruby
    97. 97. More Ruby
    98. 98. More Ruby Burden of our own devising
    99. 99. More Ruby Fast compliance
    100. 100. More Ruby Slower core performance
    101. 101. More Ruby Slower core performance Ruby vs. C/Java
    102. 102. More Ruby The upside...
    103. 103. 114 Times faster than 1.8 100 86 71 57 43 29 14 0 ruby 1.9 jruby macruby rubinius
    104. 104. 114 Times faster than 1.8 100 86 71 57 43 29 14 0 ruby 1.9 jruby macruby rubinius
    105. 105. def m; nil; end def Bench.run i=0 while i < 15_000_000 i+=1 m; m; m; m; m; m; m; m end end
    106. 106. impl 1.8 1.9 jruby macruby rbx ms 21361 6316 10101 3295 186 x faster 1.0 3.4 2.1 6.5 114.8
    107. 107. impl 1.8 1.9 jruby macruby rbx ms 21361 6316 10101 3295 186 x faster 1.0 3.4 2.1 6.5 114.8
    108. 108. impl 1.8 1.9 jruby macruby rbx ms 21361 6316 10101 3295 186 x faster 1.0 3.4 2.1 6.5 114.8
    109. 109. impl 1.8 1.9 jruby macruby rbx ms 21361 6316 10101 3295 186 x faster 1.0 3.4 2.1 114.8 6.5
    110. 110. impl 1.8 1.9 jruby macruby rbx ms 21361 6316 10101 3295 186 x faster 1.0 3.4 114.8 2.1 6.5
    111. 111. impl 1.8 1.9 jruby macruby rbx 114.8 ms 21361 6316 10101 3295 186 x faster 1.0 3.4 2.1 6.5
    112. 112. Bug
    113. 113. Bug right?
    114. 114. Bug
    115. 115. def m; nil; end def Bench.run i=0 while i < 15_000_000 i+=1 m; m; m; m; m; m; m; m end end
    116. 116. Year 4 JIT Method Inlining
    117. 117. def m; nil; end def Bench.run i=0 while i < 15_000_000 i+=1 m; m; m; m; m; m; m; m end end
    118. 118. bin/rbx -Xjit.inline.debug 0/bm_vm2_method.rb
    119. 119. JIT: compiling Object#run inlining: primitive fixnum_lt into run. inlining: Object#m into run (<metaclass>) inlining: Object#m into run (<metaclass>) inlining: Object#m into run (<metaclass>) inlining: Object#m into run (<metaclass>) inlining: Object#m into run (<metaclass>) inlining: Object#m into run (<metaclass>) inlining: Object#m into run (<metaclass>) inlining: Object#m into run (<metaclass>)
    120. 120. def m; nil; end def Bench.run i=0 while i < 15_000_000 i+=1 nil;nil;nil;nil;nil;nil;nil;nil end end
    121. 121. def m; nil; end def Bench.run i=0 while i < 15_000_000 i+=1 end end
    122. 122. Performance
    123. 123. Performance Many programs, much faster
    124. 124. Performance Many programs, a little slower
    125. 125. Performance Some programs, a lot slower
    126. 126. Releases
    127. 127. Releases 0.13
    128. 128. Releases 0.13 JIT by default
    129. 129. Releases 0.13 Lots of fixes
    130. 130. 1.0rc1
    131. 131. Next Week!
    132. 132. Expectations
    133. 133. Expectations Runs rails 3
    134. 134. Expectations Performance improvements
    135. 135. Expectations One RC every month
    136. 136. Expectations One RC every month Until 1.0 is out.

    ×