Re:Rails 3.2 Performance: Another Step Slower
by philwelch on Wednesday November 27, 2013 @01:31AM
(#6806788)
It's not just the actual metaprogramming, i.e. define_method is slow. It's also the runtime implications of metaprogramming being possible, i.e. needing to dispatch each and every method call dynamically just in case someone called define_method. Java can turn every method call into a function pointer at compile time.
If you do a lot of reflection in Java then you'll end up with some pretty crummy performance, but the average Java program doesn't have much.