From: Peter Giacomo Lombardo Date: 2013-07-17T02:40:50+09:00 Subject: Kernel.caller Performance Across Different Ruby Versions I wrote a quick Ruby script to benchmark Kernel.caller using ruby-prof. I then ran that script manually across 3 Ruby versions. The results indicate that Kernel.caller is incrementally slower in newer Ruby versions. This seems counter-intuitive to me so what am I missing? Is there something wrong in the way I'm benchmarking Kernel.caller or the test script itself? The test script with ruby-prof output is available here: https://gist.github.com/pglombardo/5978849 A couple notes: * For each Ruby version, I ran the test suite 5 times and pasted the fastest output in the gist (based on total time) * Ruby versions were standard "out of the box" as installed by rbenv * The three Ruby versions were: 1.8.7-p374, 1.9.3-p448, 2.0.0-p247 Test Summary: Kernel.caller Total Times across Ruby Versions (Each test makes 500 Kernel.caller calls with 1508 frames) Ruby 1.8.7-p374: 0.369ms Ruby 1.9.3p448 : 0.462ms Ruby 2.0.0-p247: 0.769ms Any input/guidance would be appreciated. Thanks! Peter Giacomo Lombardo -- Posted via http://www.ruby-forum.com/.