[#81999] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — ko1@...
Issue #13737 has been updated by ko1 (Koichi Sasada).
4 messages
2017/07/11
[#82005] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — nobu@...
Issue #13737 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/07/12
[#82102] Re: register_fstring_tainted:FL_TEST_RAW(str, RSTRING_FSTR) — Eric Wong <normalperson@...>
Koichi Sasada <ko1@atdot.net> wrote:
4 messages
2017/07/18
[#82151] [Ruby trunk Feature#13637] [PATCH] tool/runruby.rb: test with smallest possible machine stack — Rei.Odaira@...
Issue #13637 has been updated by ReiOdaira (Rei Odaira).
3 messages
2017/07/24
[ruby-core:82195] [Ruby trunk Bug#13773] Improve String#prepend performance if only one argument is given
From:
watson1978@...
Date:
2017-07-27 07:50:16 UTC
List:
ruby-core #82195
Issue #13773 has been reported by watson1978 (Shizuo Fujita).
----------------------------------------
Bug #13773: Improve String#prepend performance if only one argument is given
https://bugs.ruby-lang.org/issues/13773
* Author: watson1978 (Shizuo Fujita)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v:
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
This is very similar with https://github.com/ruby/ruby/pull/1634
If only one argument is given, this will prepend the string without
generating temporary object.
~~~
String#prepend -> 47.5 % up
~~~
### Before
~~~
String#prepend 1.517M (賊 1.8%) i/s - 7.614M in 5.019819s
~~~
### After
~~~
String#prepend 2.236M (賊 3.4%) i/s - 11.234M in 5.029716s
~~~
### Test code
~~~ruby
require 'benchmark/ips'
Benchmark.ips do |x|
x.report "String#prepend" do |loop|
loop.times { "!".prepend("hello") }
end
end
~~~
### Patch
https://github.com/ruby/ruby/pull/1670
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>