From: rafaelmfranca@... Date: 2018-07-19T18:34:24+00:00 Subject: [ruby-core:88009] [Ruby trunk Bug#14920] Backport r63857 to fix performance problem on Time class in MacOs systems Issue #14920 has been updated by rafaelfranca (Rafael Fran��a). Thank you for changing the status and the backport information. Yes, that patch seems safer, but when I applied only r63994 on top of v2_4_4 tag I still see the same results running the following script. ``` require 'benchmark' def create_utc_time 100_000.times { Time.utc(2018) } end p "Main Process: #{Benchmark.measure { create_utc_time } }" pid = Process.fork do p "Fork Process: #{Benchmark.measure { create_utc_time }}" end Process.wait(pid) ``` ``` $ ./build/bin/ruby utc_benchmark.rb "Main Process: 0.100000 0.000000 0.100000 ( 0.101757)\n" "Fork Process: 9.810000 27.470000 37.280000 ( 37.981360)\n" ``` With only r63857 I get better results. ``` $ ./build/bin/ruby utc_benchmark.rb "Main Process: 0.050000 0.000000 0.050000 ( 0.052233)\n" "Fork Process: 0.050000 0.000000 0.050000 ( 0.064096)\n" ``` ---------------------------------------- Bug #14920: Backport r63857 to fix performance problem on Time class in MacOs systems https://bugs.ruby-lang.org/issues/14920#change-73028 * Author: rafaelfranca (Rafael Fran��a) * Status: Closed * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.3: REQUIRED, 2.4: REQUIRED, 2.5: REQUIRED ---------------------------------------- Related to https://bugs.ruby-lang.org/issues/14435. Both 2.4 and 2.5 are affected by this issue. Naruse-san commit fix it by not calling tzset() more than once when we know the year doesn't have leap seconds. -- https://bugs.ruby-lang.org/ Unsubscribe: