[#78949] [Ruby trunk Feature#13095] [PATCH] io.c (rb_f_syscall): remove deprecation notice — kosaki.motohiro@...
Issue #13095 has been updated by Motohiro KOSAKI.
3 messages
2017/01/03
[#78997] [Ruby trunk Bug#13110] Byte-based operations for String — shugo@...
Issue #13110 has been updated by Shugo Maeda.
3 messages
2017/01/06
[#79228] Re: [ruby-cvs:64576] naruse:r57410 (trunk): Prevent GC by volatile [Bug #13150] — Eric Wong <normalperson@...>
naruse@ruby-lang.org wrote:
5 messages
2017/01/23
[#79511] Re: [ruby-cvs:64576] naruse:r57410 (trunk): Prevent GC by volatile [Bug #13150]
— Eric Wong <normalperson@...>
2017/02/13
Eric Wong <normalperson@yhbt.net> wrote:
[#79518] Re: [ruby-cvs:64576] naruse:r57410 (trunk): Prevent GC by volatile [Bug #13150]
— Nobuyoshi Nakada <nobu@...>
2017/02/13
On 2017/02/13 10:04, Eric Wong wrote:
[#79298] [Ruby trunk Bug#13085][Assigned] io.c io_fwrite creates garbage — nobu@...
Issue #13085 has been updated by Nobuyoshi Nakada.
3 messages
2017/01/29
[#79337] Re: [ruby-changes:45397] normal:r57469 (trunk): io.c: recycle garbage on write — SASADA Koichi <ko1@...>
Eric:
4 messages
2017/01/31
[#79352] Re: [ruby-changes:45397] normal:r57469 (trunk): io.c: recycle garbage on write
— Eric Wong <normalperson@...>
2017/01/31
SASADA Koichi <ko1@atdot.net> wrote:
[ruby-core:79011] [Ruby trunk Bug#13113] Performance issue, const_set Module.new is too slow in Ruby 2.4
From:
nobu@...
Date:
2017-01-08 02:13:47 UTC
List:
ruby-core #79011
Issue #13113 has been updated by Nobuyoshi Nakada.
benchmark results:
Execution time (sec)
name | 2.3.3| r57281| r57284
-------------------------|-------:|-------:|--------
loop_whileloop2 | 0.146| 0.135| 0.106
vm2_module_ann_const_set*| 9.072| 107.850| 6.889
vm2_module_const_set* | 3.954| 13.374| 3.468
Speedup ratio: compare with the result of `2.3.3' (greater is better)
name | r57281| r57284
-------------------------|-------:|-------:
loop_whileloop2 | 1.075| 1.373
vm2_module_ann_const_set*| 0.084| 1.317
vm2_module_const_set* | 0.296| 1.140
----------------------------------------
Bug #13113: Performance issue, const_set Module.new is too slow in Ruby 2.4
https://bugs.ruby-lang.org/issues/13113#change-62420
* Author: Masataka Kuwabara
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
* Backport: 2.2: DONTNEED, 2.3: DONTNEED, 2.4: REQUIRED
----------------------------------------
In Ruby 2.4, the following code is too slow.
~~~ ruby
5000000.times { Module.new.const_set(:X, Module.new) }
~~~
In Ruby 2.4, it took 115.68 seconds to run this code.
However, in Ruby 2.3.3, it took 7.36 seconds.
And if const_set value is not Module.new, it is not slow. For example
~~~ ruby
5000000.times { Module.new.const_set(:X, 2) }
~~~
Ruby versions
~~~
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
~~~
See also. https://github.com/rspec/rspec-core/issues/2365
--
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>