[#80974] [Ruby trunk Feature#13517] [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit — ko1@...
Issue #13517 has been updated by ko1 (Koichi Sasada).
4 messages
2017/05/02
[#81024] Re: [Ruby trunk Feature#13517] [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit
— SASADA Koichi <ko1@...>
2017/05/07
sorry for late response.
[#80996] [Ruby trunk Feature#13544] Allow loading an ISeqs sequence directly from a C extension without requiring buffer is in an RVALUE — sam.saffron@...
Issue #13544 has been reported by sam.saffron (Sam Saffron).
3 messages
2017/05/04
[#81016] [Ruby trunk Bug#13526] Segmentation fault at 0x0055c2e58e8920 ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux] — s.wanabe@...
Issue #13526 has been updated by wanabe (_ wanabe).
3 messages
2017/05/07
[#81048] Re: [ruby-cvs:65788] normal:r58614 (trunk): rb_execution_context_t: move stack, stack_size and cfp from rb_thread_t — SASADA Koichi <ko1@...>
It causes compile error on raspi 3.
3 messages
2017/05/09
[#81201] Re: [ruby-cvs:65935] normal:r58761 (trunk): test/test_extilibs.rb: do not check the existence of fiddle — "U.NAKAMURA" <usa@...>
Hi, Eric
4 messages
2017/05/16
[#81202] Re: [ruby-cvs:65935] normal:r58761 (trunk): test/test_extilibs.rb: do not check the existence of fiddle
— Eric Wong <normalperson@...>
2017/05/16
"U.NAKAMURA" <usa@garbagecollect.jp> wrote:
[#81427] Fwd: [ruby-changes:46809] normal:r58924 (trunk): test for IO.copy_stream CPU usage (r58534) — SASADA Koichi <ko1@...>
Hi,
6 messages
2017/05/28
[#81428] Re: Fwd: [ruby-changes:46809] normal:r58924 (trunk): test for IO.copy_stream CPU usage (r58534)
— Eric Wong <normalperson@...>
2017/05/28
SASADA Koichi <ko1@atdot.net> wrote:
[ruby-core:81216] [Ruby trunk Feature#12996] Optimize Range#===
From:
co000ri@...
Date:
2017-05-17 14:14:50 UTC
List:
ruby-core #81216
Issue #12996 has been updated by ksss (Yuki Kurihara). File range_eqq2.patch added I updated the patch (range_eqq2.patch). It optimize only special cases. --- # Range with Fixnum ~~~ i = 0 while i < 10_000_000 case i when 1..1000 end i += 1 end ~~~ ## Before ~~~ $ time ./miniruby t.rb ./miniruby t.rb 5.27s user 0.02s system 98% cpu 5.354 total ~~~ ## After ~~~ $ time ./miniruby t.rb ./miniruby t.rb 4.45s user 0.04s system 96% cpu 4.644 total ~~~ --- # Range with String ~~~ i = 0 while i < 10_000_000 case "c" when "a".."z" end i += 1 end ~~~ ## Before ~~~ $ time ./miniruby t.rb ./miniruby t.rb 8.45s user 0.02s system 99% cpu 8.534 total ~~~ ## After ~~~ $ time ./miniruby t.rb ./miniruby t.rb 3.80s user 0.01s system 98% cpu 3.874 total ~~~ --- Of course, test-all passed. ~~~ $ make test-all TESTS=test/ruby/test_range.rb ./tool/ifchange "--timestamp=.rbconfig.time" rbconfig.rb rbconfig.tmp rbconfig.rb unchanged creating verconf.h verconf.h updated compiling loadpath.c linking static-library libruby.2.5.0-static.a /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libruby.2.5.0-static.a(debug_counter.o) has no symbols linking shared-library libruby.2.5.0.dylib linking ruby Run options: "--ruby=./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems" --excludes-dir=./test/excludes --name=!/memory_leak/ # Running tests: Finished tests in 2.777357s, 14.7622 tests/s, 144652.6320 assertions/s. 41 tests, 401752 assertions, 0 failures, 0 errors, 0 skips ruby -v: ruby 2.5.0dev (2017-05-17 trunk 58600) [x86_64-darwin16] ~~~ ---------------------------------------- Feature #12996: Optimize Range#=== https://bugs.ruby-lang.org/issues/12996#change-64873 * Author: ksss (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) range_eqq2.patch (1.2 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>