[#49270] [Ruby trunk - Feature #11558] Time related C APIs — akr@...
Issue #11558 has been updated by Akira Tanaka.
7 messages
2015/09/30
[#49275] Re: [Ruby trunk - Feature #11558] Time related C APIs
— KOSAKI Motohiro <kosaki.motohiro@...>
2015/09/30
>> 既存の非公開APIを公開してください。
[#49278] Re: [Ruby trunk - Feature #11558] Time related C APIs
— Tanaka Akira <akr@...>
2015/10/01
2015年10月1日 7:03 KOSAKI Motohiro <kosaki.motohiro@gmail.com>:
[ruby-dev:49272] [Ruby trunk - Bug #11559] [Open] ビジーループの thread と YAML.parse を組み合わせたときの実行時間が 2.2.3 で遅くなっている
From:
takkanm@...
Date:
2015-09-30 10:25:18 UTC
List:
ruby-dev #49272
Issue #11559 has been reported by 三村 益隆. ---------------------------------------- Bug #11559: ビジーループの thread と YAML.parse を組み合わせたときの実行時間が 2.2.3 で遅くなっている https://bugs.ruby-lang.org/issues/11559 * Author: 三村 益隆 * Status: Open * Priority: Normal * Assignee: * ruby -v: 2.2.3 * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- ビジーループするスレッドと YAML.parse を並行して実行するような以下のようなコードが 2.2.2 と 2.2.3 で、 数倍遅くなっているようです。trunk でも遅いことを確認してます。 ~~~ require 'thread' require 'yaml' puts RUBY_VERSION y = (1..1000).to_a.to_yaml t = Thread.new do while true; 1;end end 10.times do YAML.load(y) end t.kill ~~~ 実行結果 ~~~ $ time ruby thread_loop_with_while.rb 2.2.2 ruby thread_loop_with_while.rb 0.30s user 0.06s system 94% cpu 0.375 total $ time ruby thread_loop_with_loop.rb 2.2.3 ruby thread_loop_with_loop.rb 1.80s user 0.05s system 99% cpu 1.864 total ~~~ -- https://bugs.ruby-lang.org/