From: Florian Frank Date: 2007-09-05T20:24:57+09:00 Subject: Re: Ruby is much slower on linux when compiled with --enable-pthread? M. Edward (Ed) Borasky wrote: >> $ strace -c ruby -e '1.upto(100000) {|i| i.to_s}' >> % time seconds usecs/call calls errors syscall >> ------ ----------- ----------- --------- --------- ---------------- >> 100.00 0.000655 0 200006 sigprocmask > >> Yeah - it called sigprocmask over 200,000 times during that 100,000 >> iteration loop. > >> When compiled with --disable-pthread and running the same command, >> rt_sigprocmask gets called 4 times. I wonder if calling sigprocmask is the right thing to do with pthreads enabled. I found this in the man page of pthread_sigmask: "The use of the sigprocmask() function is unspecified in a multi-threaded process." Maybe pthread_sigmask should be used if ruby has pthreads enabled? -- Florian Frank