Threading Building Blocks, PThreads, and Gentoo Linux

Tonight I spoke with a new (to me) person who has integrated Threading Building Blocks into an interesting application. This developer originally worked using pthreads, then decided about a month ago to switch to Threading Building Blocks (after his pthreads application only marginally improved performance). He reported (on the #tbb IRC channel) that after a month of development his TBB-threaded application produces a 2-times speed up, versus a fractional speed up after 5 months of development using pthreads.

The development effort factor


This, to me, is a significant "real life" demonstration of the benefits TBB provides. Traditional threading, in this particular instance, provided a processing efficiency gain that was much smaller than the gain accrued when TBB was implemented. And it was possible to replace the original PThreads implementation with a Threading Building Blocks implementation in just a month! Those who know about multithreaded development can appreciate that multithreading a significant project in one month is quite an accomplishment.

The Gentoo factor


So how, you ask, does Gentoo Linux fit into this post? Well, the developer I'm talking about has provided me with a Gentoo "ebuild" for installing Threading Building Blocks on your Gentoo Linux system. I have not yet unpacked the ebuild -- I'll get to that soon! But I think this is a great indication that TBB is finding its community, a community that wants to help make Threading Building Blocks more conveniently available to other developers who are working on their own favored platform.

Gentoo Linux has a reputation as being a "developer's Linux distribution." I think this is true. Gentoo in fact calls itself a "meta-distribution" rather than a full Linux distribution -- by which they mean, they provide the pieces and you construct the operating system / environment you want. So, if we can get this Gentoo ebuild configured properly, then it could be integrated such that you'd be able to use Gentoo's Portage package installer to install a working TBB library onto your Gentoo system, providing you with a working TBB environment on Gentoo,

TBB installation packaging


Threading Building Blocks is finding developers who want to use the library on a wide variety of operating systems. Intel's Mike Davis documented the early support for TBB by [http://softwarecommunity.intel.com/isn/Community/en-US/forums/thread/30238853.aspx]Linux distributors in the TBB Forum. Tonight I received a Gentoo Linux TBB ebuild from a developer who has successfully implemented Threading Building Blocks in a significant application. I'll be working with this ebuild and will report on it in future posts.

Kevin Farnham
O'Reilly Media
TBB Open Source Community

For more complete information about compiler optimizations, see our Optimization Notice.