Rubinius @ RubyAndRails2010

download Rubinius @ RubyAndRails2010

of 46

  • date post

    15-May-2015
  • Category

    Technology

  • view

    883
  • download

    0

Embed Size (px)

Transcript of Rubinius @ RubyAndRails2010

  • 1. RubiniusUse Ruby

2. Dirkjan Bussink http://github.com/dbussink@dbussink 3. 1.1 is out! 4. Lets have funand write a newinterpreter! 2006 5. 1.0 by end 2007! 2006 6. Ok, maybe not... 2007 7. 1.0! 2010 8. 2 virtual machines 9. 2 virtual machines 1.75 garbage collectors 10. 2 virtual machines 1.75 garbage collectors 3 bytecode compilers 11. 2 virtual machines 1.75 garbage collectors 3 bytecode compilers 1 Ruby core library 12. 2 virtual machines 1.75 garbage collectors 3 bytecode compilers 1 Ruby core library 2 primitives systems 13. 2 virtual machines 1.75 garbage collectors 3 bytecode compilers 1 Ruby core library 2 primitives systems 2 JIT compilers 14. Rubyspec 15. Ruby in Ruby 16. module Enumerable def collect if block_given? ary = [] each { |o| ary [:@street, :@number, :@city] 21. a= Address.newa.street = "Street"a.number = "1"a.city = "Enschede" Rubinius.memory_size(a) => 56 VS Rubinius.memory_size(a) => 160 22. JIT 23. InlineCache 24. module CoolModule def method1 1 + 1 end endclass CoolObject include CoolModule endCoolObject.new.method1 25. Call counting 26. def method1 1 + 1 enddef method2 method1 end100.times do method2 end 27. members of rubinius::VMMethod: total_args = 0, call_count = 21, llvm_function_ = 0x0, name_ = 0x6306, 28. Go JIT! RBXLLVM thread(s) thread Here it is! 29. Debugging 30. DEMO 31. Proling 32. DEMO 33. Contributing 34. 3 legged dog turtlesspace shuttle rubinius Performance26 35. commit 5386d9299360b5f1ede14392b97da6dc7163ed00 Author: Dirkjan Bussink Date: Tue Jan 8 20:29:01 2008 +0100 Added Process::POSIX safety checksdiff --git a/kernel/core/process.rb b/kernel/core/process.rb index fec15b6..ff50b49 100644 --- a/kernel/core/process.rb +++ b/kernel/core/process.rb @@ -103,11 +103,15 @@ module Processenddef self.getpgid(pid) - Platform::POSIX.getpgid(pid) + ret = Platform::POSIX.getpgid(pid) + Errno.handle if ret == -1 + ret enddef self.setpgid(pid, int) - Platform::POSIX.setpgid(pid, int) + ret = Platform::POSIX.setpgid(pid, int) + Errno.handle if ret == -1 + ret end@maxgroups = 32 36. 1 patch == commit access 37. rbx my_awesome_code.rb 38. Future 39. 1.9 40. DEMO 41. So when will you be a contributor?