String#[]= is slow #2830

Open
kwleland opened this Issue Dec 16, 2013 · 4 comments

Projects

None yet

2 participants

@kwleland

String#[]= is 3 times slower in rubinius than in mri 2.1.0.preview1

It is approx 40 percent of the problem with the bm_word_anagrams.rb benchmark
which is 3 times slower in rubinius than mri

test code:

7_000_000.times do
s = "abcdefghijk"
s[5] = "x"
end

Timings:

rubinius 2.2.1
real 0m9.811s
user 0m10.204s
sys 0m0.103s

ruby 2.1.0.preview1
real 0m2.910s
user 0m2.878s
sys 0m0.012s

rubinius style benchmark: https://gist.github.com/kwleland/7988659

@dbussink
Rubinius member

Any reason you didn't turn it into a PR with the benchmark?

@kwleland kwleland closed this Dec 16, 2013
@kwleland kwleland reopened this Dec 16, 2013
@kwleland

just wanted to make sure it was sufficiently worthy :) Am working on it.

@dbussink
Rubinius member

I consider adding useful benchmarks to be always worthy :). And if it turns out not to be, that can always be discussed on the PR :).

@kwleland

PR #2831 added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment