Charles Oliver Nutter wrote:
This could be really big. Patch attached.

## script
require 'benchmark'

c = 0
script = 'a = 1; b = 2; c = c + a + b'
bnd = binding

puts "implicit binding"
puts Benchmark.realtime { 1000000.times { eval script } }
puts "explicit binding"
puts Benchmark.realtime { 1000000.times { eval script, bnd } }

## before
~/NetBeansProjects/jruby $ jruby bench_eval.rb
implicit binding
85.61300015449524
explicit binding
81.47699999809265
~/NetBeansProjects/jruby $ jruby -J-server -O bench_eval.rb
implicit binding
69.26199984550476
explicit binding
67.39000010490417
It seems possible that this is one of the really big bottlenecks in Rails. I was surprised about how long the view took to render compared to controller invocation.

Cheers

--
Ola Bini (http://ola-bini.blogspot.com) JRuby Core Developer
Developer, ThoughtWorks Studios (http://studios.thoughtworks.com)
Practical JRuby on Rails (http://apress.com/book/view/9781590598818)

"Yields falsehood when quined" yields falsehood when quined.



---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to