Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

String#[]= is slow #2830

Open
kwleland opened this Issue · 4 comments

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
Owner

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

@kwleland kwleland closed this
@kwleland kwleland reopened this
@kwleland

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

@dbussink
Owner

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
Something went wrong with that request. Please try again.