[#79440] [Ruby trunk Bug#13188] Reinitialize Ruby VM. — shyouhei@...
Issue #13188 has been updated by Shyouhei Urabe.
6 messages
2017/02/06
[#79441] Re: [Ruby trunk Bug#13188] Reinitialize Ruby VM.
— SASADA Koichi <ko1@...>
2017/02/06
On 2017/02/06 10:10, shyouhei@ruby-lang.org wrote:
[#79532] Immutable Strings vs Symbols — Daniel Ferreira <subtileos@...>
Hi,
15 messages
2017/02/15
[#79541] Re: Immutable Strings vs Symbols
— Rodrigo Rosenfeld Rosas <rr.rosas@...>
2017/02/15
Em 15-02-2017 05:05, Daniel Ferreira escreveu:
[#79543] Re: Immutable Strings vs Symbols
— Daniel Ferreira <subtileos@...>
2017/02/16
Hi Rodrigo,
[#79560] Re: Immutable Strings vs Symbols
— Rodrigo Rosenfeld Rosas <rr.rosas@...>
2017/02/16
Em 15-02-2017 22:39, Daniel Ferreira escreveu:
[ruby-core:79655] [Ruby trunk Feature#12996] Optimize Range#===
From:
matz@...
Date:
2017-02-22 05:54:55 UTC
List:
ruby-core #79655
Issue #12996 has been updated by Yukihiro Matsumoto. Sounds reasonable. We'd like to see how big incompatibility is. Matz. ---------------------------------------- Feature #12996: Optimize Range#=== https://bugs.ruby-lang.org/issues/12996#change-63072 * Author: Yuki Kurihara * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- The proposal is that Range#=== optimize by reducing method calls. ## Benchmark ~~~shell $ cat t.rb i = 0 while i < 1_000_000 case i when 1..1000 end i += 1 end ~~~ ~~~ $ time ./miniruby -e 1 ./miniruby -e 1 0.01s user 0.00s system 85% cpu 0.013 total ~~~ ### Before ~~~ $ time ./miniruby t.rb ./miniruby t.rb 0.60s user 0.00s system 99% cpu 0.605 total ~~~ ### After ~~~ $ time ./miniruby t.rb ./miniruby t.rb 0.41s user 0.00s system 99% cpu 0.420 total ~~~ ## Important point Break compatibility in this case. https://github.com/ruby/ruby/blob/80045bc2a9e12012d6d16517ea5cb037e67eb2c1/test/ruby/test_range.rb#L333-L355 I don't know how to fix this issue. But I think, This is a key sentence maybe. https://github.com/ruby/ruby/blob/8130ee5c9dea6d1323d41271cc01c8dc5d8bcc5d/range.c#L1176 ---Files-------------------------------- range-eqq.patch (1.35 KB) -- 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>