What is faster on later invocation:
def first_method?() second_method?() end
or
alias_method :first method, :second_method
and if possible why?
(NOTE: I don’t ask what is nicer / better etc. -> only raw speed and why it is faster is interesting here)
a quick look at the source code, will show you the trick:
http://www.ruby-doc.org/core/classes/Module.src/M000447.html
alias_method is written in C. moreover, defining a method in ruby that calls another method, will result in 2 method lookups and calls.
so, alias_method should be faster.