Enumerator#each on enumerators created with Enumerator.new in 1.9 mode is slow
------------------------------------------------------------------------------
Key: JRUBY-5998
URL: https://jira.codehaus.org/browse/JRUBY-5998
Project: JRuby
Issue Type: Bug
Components: Ruby 1.9.2
Affects Versions: JRuby 1.6.3
Reporter: Ben Mabey
Assignee: Thomas E Enebo
Priority: Minor
In 1.9 mode Enumerator.new spins up a new Generator instance along with a
thread...
I discovered this bug when evaluating lazy list options in Ruby. The
`Denumerable` class from the facets gem provided an option so I was
benchmarking the performance of it. Here are the benchmarks revlaling how slow
1.9 mode is in dealing with Enumerator.new and Enumerator#next:
https://gist.github.com/1145736
In 1.8 mode JRuby performs well since it is using the monkeypatched version of
Enumerator that facets provides:
https://github.com/rubyworks/facets/blob/master/lib/core/facets/enumerator.rb#L37-44
See the IRC log discussion with headius and mabes:
http://logs.jruby.org/jruby/2011-08-15.html#T18-44-37
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email