# Mac OS X Leopard - Ruby is 3X faster with disable-pthreads

**URL:** <https://www.ruby-forum.com/t/mac-os-x-leopard-ruby-is-3x-faster-with-disable-pthreads/151814>\
**Category:** Ruby\
**Created:** [October 26, 2008, 5:59am UTC](https://www.ruby-forum.com/t/mac-os-x-leopard-ruby-is-3x-faster-with-disable-pthreads/151814 "2008-10-26T05:59:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericgoodwin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c68b51/32.png) [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Post date:** [October 26, 2008, 5:59am UTC](https://www.ruby-forum.com/t/mac-os-x-leopard-ruby-is-3x-faster-with-disable-pthreads/151814/1 "2008-10-26T05:59:47Z")

</div>

I have a fast mac pro computer.

I ran simple benchmark, and my computer took 13 seconds when  
equal/slower macs around my office were only taking 2.5 seconds to  
complete the exact same task.

I also noticed that my ruby was generally less zippier.

So I configure ruby to run WITHOUT pthread support, and now its at the  
same speed as the other computers.

I dont really know how this could potentially screw things up, but Im  
definitely liking the speed increase. The compiler told me the  
following:

\*\*  
\*\* PTHREAD SUPPORT MODE ERROR:  
\*\*  
\*\* Ruby is not compiled with --enable-pthread, but your Tcl/Tk  
\*\* library seems to be compiled with pthread support. This  
\*\* combination may cause frequent hang or segmentation fault  
\*\* errors when Ruby/Tk is working. We recommend that you NEVER  
\*\* create the library with such a combination of pthread support.  
\*\*  
\*\* Please recompile Ruby with the “–enable-pthread” configure option  
\*\* or recompile Tcl/Tk with the “–disable-threads” configure option.  
\*\*

What Im curious about is, why the big speed difference? Its a night and  
day difference in performance. Is there any kind of other performance  
issues that I have to watch out for now, like more frequent crashing or  
something?

---

<div class="post-metadata">

**Author:** ![ericgoodwin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c68b51/32.png) [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Post date:** [October 26, 2008, 10:48pm UTC](https://www.ruby-forum.com/t/mac-os-x-leopard-ruby-is-3x-faster-with-disable-pthreads/151814/2 "2008-10-26T22:48:34Z")

</div>

On Oct 25, 2008, at 9:59 PM, Aryk G. wrote:

> ## \*\* errors when Ruby/Tk is working. We recommend that you NEVER day difference in performance. Is there any kind of other performance issues that I have to watch out for now, like more frequent crashing or something?
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

As long as you aren’t using tk at all then you have no issue to watch  
out for. I compile _all_ of my ruby’s with pthreads disabled including  
all engine yard slices.

Cheers-

Ezra Z.  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![ericgoodwin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c68b51/32.png) [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Post date:** [October 26, 2008, 11:34pm UTC](https://www.ruby-forum.com/t/mac-os-x-leopard-ruby-is-3x-faster-with-disable-pthreads/151814/3 "2008-10-26T23:34:16Z")

</div>

Quoting Ezra Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> > ## \*\* Ruby is not compiled with --enable-pthread, but your Tcl/Tk day difference in performance. Is there any kind of other performance issues that I have to watch out for now, like more frequent crashing or something?
> > 
> > Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> As long as you aren’t using tk at all then you have no issue to watch  
> out for. I compile _all_ of my ruby’s with pthreads disabled including  
> all engine yard slices.

You can also recompile “tcl” and “tk” with “pthreads” disabled. I  
ended up having to run all three of them with pthreads for some other  
dependency, although I don’t remember which one. And I think Ruby 1.9  
requires pthreads.
