From owner-freebsd-ports@FreeBSD.ORG Wed Aug 14 12:23:33 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 46DBE84F for ; Wed, 14 Aug 2013 12:23:33 +0000 (UTC) (envelope-from Mark.Martinec+freebsd@ijs.si) Received: from mail.ijs.si (mail.ijs.si [IPv6:2001:1470:ff80::25]) by mx1.freebsd.org (Postfix) with ESMTP id BC0E02609 for ; Wed, 14 Aug 2013 12:23:32 +0000 (UTC) Received: from amavis-proxy-ori.ijs.si (localhost [IPv6:::1]) by mail.ijs.si (Postfix) with ESMTP id 3cFVM74kSKzGMc8 for ; Wed, 14 Aug 2013 14:23:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ijs.si; h= message-id:content-transfer-encoding:content-type:content-type :mime-version:in-reply-to:references:user-agent:date:date :subject:subject:organization:from:from:received:received :received:vbr-info; s=jakla2; t=1376483009; x=1379075010; bh=6lZ UZgW/JJdMfXHcoUBZDXdM7LTK8AR9jXwlTi4GC/Y=; b=JxmyvMcLepwC9Z4YZUB N/HzKXhxOOTMCvGTIvCflRx4HPry5jxdkNMAeB0cYKFby1W9uDojD/kl4KMICPJe 0RSwxpyTFeJqlmrvfPeC83VUJOhR06W00ynFHXJwOpcmRmOzz/tcE8q3skV/3qLe pUZjw4OeMra4qEE+sxhRdnlM= VBR-Info: md=ijs.si; mc=all; mv=dwl.spamhaus.org; X-Virus-Scanned: amavisd-new at ijs.si Received: from mail.ijs.si ([IPv6:::1]) by amavis-proxy-ori.ijs.si (mail.ijs.si [IPv6:::1]) (amavisd-new, port 10012) with ESMTP id eWCBeJ6uQiJF for ; Wed, 14 Aug 2013 14:23:29 +0200 (CEST) Received: from mildred.ijs.si (mailbox.ijs.si [IPv6:2001:1470:ff80::143:1]) by mail.ijs.si (Postfix) with ESMTP for ; Wed, 14 Aug 2013 14:23:29 +0200 (CEST) Received: from neli.ijs.si (neli.ijs.si [IPv6:2001:1470:ff80:88:21c:c0ff:feb1:8c91]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mildred.ijs.si (Postfix) with ESMTPSA id 7D8777AD for ; Wed, 14 Aug 2013 14:23:29 +0200 (CEST) From: Mark Martinec Organization: J. Stefan Institute To: freebsd-ports@freebsd.org Subject: Re: Perl and Threads Date: Wed, 14 Aug 2013 14:23:28 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.2-PRERELEASE; KDE/4.10.5; amd64; ; ) References: <20130814063931.72c73b6a@scorpio> In-Reply-To: <20130814063931.72c73b6a@scorpio> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201308141423.28591.Mark.Martinec+freebsd@ijs.si> X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Aug 2013 12:23:33 -0000 > The Perl ports offer options for "THREADS" AND "PERL_MALLOC". > Example from the perl5.18 port: > > # make showconfig > {snip} > ====> Exclusive OPTIONS: you can only select none or one of them > THREADS=off: Build threaded perl > PERL_MALLOC=off: Use Perl malloc > > Is there any advantage to one or the other? > I have seen ports that have options that require a threaded perl. > Why would I not want to use at least one of the options? There are indeed some modules in ports which require a threaded perl. Within the set of 100 perl ports we have in use on our servers I never got in a situation that would require a threaded perl. Btw, not to be confused with the PTHREAD option, which is often needed due to some underlying library needing a threads support. I could find the following ports which require a threaded perl: multimedia/p5-GStreamer mail/p5-Sendmail-Milter editors/p5-Padre devel/p5-SDL devel/p5-SNMP-Persist devel/p5-Glib2 (plus some dedicated modules for thread support). Unless you need one of such modules, building a threaded perl is just a waste for all other uses. About PERL_MALLOC I'm not sure. With a modern memory allocator that comes with more recent versions of FreeBSD, I'd say that PERL_MALLOC does not bring any advantage. For a true answer one would need to benchmark the specific application one has in mind. Mark