From: Shyouhei Urabe Date: 2011-02-28T12:54:03+09:00 Subject: [ruby-core:35389] [Backport87 - Backport #2553] [Open] Fix pthreads slowness by eliminating unnecessary sigprocmask calls Issue #2553 has been updated by Shyouhei Urabe. Tracker changed from Bug to Backport Status changed from Closed to Open % Done changed from 100 to 0 As of 1.8.7-334 this issue is reopened because the proposed fix broke binary compatibility. cf [ruby-dev:43152] ---------------------------------------- Backport #2553: Fix pthreads slowness by eliminating unnecessary sigprocmask calls http://redmine.ruby-lang.org/issues/2553 Author: Dan Peterson Status: Open Priority: Low Assignee: Shyouhei Urabe Category: core Target version: ruby -v: ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-linux] This is a bug report for what's described here: http://timetobleed.com/fix-a-bug-in-rubys-configurein-and-get-a-30-performance-boost/ Matz says here that this should already be fixed in 1.8.7: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/23583 But it does not appear to be. Example with 1.8.7-p248: # apply patch from above link % make distclean % ./configure --enable-pthread % make % time ./ruby -e '1_000_000.times { x = 2 ** 256 }' ./ruby -e '1_000_000.times { x = 2 ** 256 }' 1.45s user 0.34s system 99% cpu 1.809 total % strace ./ruby -e '1_000.times { x = 2 ** 256 }' 2>&1 | grep -c sigproc 1009 % make distclean % ./configure --disable-ucontext --enable-pthread % make % time ./ruby -e '1_000_000.times { x = 2 ** 256 }' ./ruby -e '1_000_000.times { x = 2 ** 256 }' 1.16s user 0.00s system 99% cpu 1.171 total % strace ./ruby -e '1_000.times { x = 2 ** 256 }' 2>&1 | grep -c sigproc 3 % ./ruby -v ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-linux] -- http://redmine.ruby-lang.org