62. Ruby = Method Calls
Lots and lots and lots and lots...
63. def foo
bar
end
def bar
baz foo bar baz
end
def baz
# ...
end
64. def foo
JRuby on Java 5/6
bar
end
def bar JRuby JRuby
baz foo call bar call baz
end logic logic
def baz
# ...
end
Kills many JVM optimizations
65. def foo
JRuby on Java 7
bar
X X
end
def bar JRuby JRuby
baz foo call bar call baz
end logic logic
def baz
# ...
end
Dynamic call logic built into JVM
66. def foo
JRuby on Java 7
bar
end
def bar
baz foo bar baz
end
def baz
# ...
end
Straight through dispatch path
67. def foo
JRuby on Java 7
bar
end
def bar
baz foo bar baz
end
def baz
# ...
end
Optimizations (like inlining) can happen!