Pathological slowdown in Array#insert
-------------------------------------
Key: JRUBY-1681
URL: http://jira.codehaus.org/browse/JRUBY-1681
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.1b1
Environment: ruby 1.8.5 (2007-11-25 rev 4842) [i386-jruby1.1b1], OS X
10.4.11
Reporter: Daniel Berger
Priority: Minor
Like MRI, JRuby's Array#insert method becomes very slow with high numbers of
iterations. Below is a snippet, which is also included as part of the
bench_array.rb program in ruby_test:
{noformat}
require "benchmark"
MAX = 200000
Benchmark.bm(35) do |x|
x.report("Array#insert"){
array = [1,2,3,4]
MAX.times{ array.insert(2, "a", "b") }
}
end
{noformat}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
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