How does truffle enhance JRuby to create such a dramatic performance improvement?
This blog post and video explain where a lot of the big speedups come from.
http://chrisseaton.com/rubytruffle/deoptimizing/
I wrote my PhD about this topic, so there is even a whole thesis if you really want to get the details on how it works.
I wish it could be summarised in a comment, but it's actually not "that simple," so I recommend you read Chris Seaton's posts about GraalVM and JRuby+Truffle which has some excellent high-level explanations [of why Graal is amazing]. :)