diff options
author | glass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-01 13:44:49 +0000 |
---|---|---|
committer | glass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-01 13:44:49 +0000 |
commit | 8320be1007be68232580e374669f54232657dc73 (patch) | |
tree | 47399c3fb76ba2ca3d2f729f3f6452fe63acbf0b /vm_eval.c | |
parent | 8875e0ca4affbe1c24ed7c13728124e58881061e (diff) | |
download | ruby-8320be1007be68232580e374669f54232657dc73.tar.gz |
string.c: avoid unnecessary call of str_strlen()
* string.c (rb_strseq_index): refactor and avoid
call of str_strlen() when offset == 0.
it will improve performance of String#index and #include?
* benchmark/bm_string_index.rb: benchmark for this change
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_eval.c')
0 files changed, 0 insertions, 0 deletions