From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christopher Allan Webber Newsgroups: gmane.lisp.guile.bugs Subject: bug#21514: Guile 2.2: Sluggish elf calls, esp around arity / promises / statprof Date: Fri, 13 Nov 2015 20:54:43 -0600 Message-ID: <871tbt7047.fsf@dustycloud.org> References: <874mirbv8x.fsf@dustycloud.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1447470479 18983 80.91.229.3 (14 Nov 2015 03:07:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Nov 2015 03:07:59 +0000 (UTC) To: 21514@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sat Nov 14 04:07:44 2015 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZxRBY-0000u8-Vr for guile-bugs@m.gmane.org; Sat, 14 Nov 2015 04:07:29 +0100 Original-Received: from localhost ([::1]:57413 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxRBY-0006wB-Gd for guile-bugs@m.gmane.org; Fri, 13 Nov 2015 22:07:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxR9I-0002kj-A3 for bug-guile@gnu.org; Fri, 13 Nov 2015 22:05:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxR9D-0002x6-Al for bug-guile@gnu.org; Fri, 13 Nov 2015 22:05:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxR9D-0002x2-7i for bug-guile@gnu.org; Fri, 13 Nov 2015 22:05:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZxR9C-00071H-Se for bug-guile@gnu.org; Fri, 13 Nov 2015 22:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Christopher Allan Webber Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 14 Nov 2015 03:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21514 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.144747028626957 (code B ref -1); Sat, 14 Nov 2015 03:05:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Nov 2015 03:04:46 +0000 Original-Received: from localhost ([127.0.0.1]:37612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZxR8v-00070j-Rc for submit@debbugs.gnu.org; Fri, 13 Nov 2015 22:04:46 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48429) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZxR8b-00070J-5u for submit@debbugs.gnu.org; Fri, 13 Nov 2015 22:04:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxR8a-0002ls-2o for submit@debbugs.gnu.org; Fri, 13 Nov 2015 22:04:24 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:50239) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxR8Z-0002lg-W4 for submit@debbugs.gnu.org; Fri, 13 Nov 2015 22:04:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxR8Y-0001bd-Um for bug-guile@gnu.org; Fri, 13 Nov 2015 22:04:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxR8U-0002e7-5L for bug-guile@gnu.org; Fri, 13 Nov 2015 22:04:22 -0500 Original-Received: from dustycloud.org ([50.116.34.160]:36087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxR8U-0002dX-10 for bug-guile@gnu.org; Fri, 13 Nov 2015 22:04:18 -0500 Original-Received: from earlgrey (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id BF4B7265F6 for ; Fri, 13 Nov 2015 22:04:13 -0500 (EST) In-reply-to: <874mirbv8x.fsf@dustycloud.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7905 Archived-At: --=-=-= Content-Type: text/plain Here's a fix to this bug. Tests pass, and performance appears to be back here. I've assigned copyright to the FSF for Guile so it should be fine to commit! --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Remove-thunk-arity-check-in-make-promise.patch >From 79e3b5286a2699f9b302bd3abf8a6b884b13a4f4 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Fri, 13 Nov 2015 20:42:31 -0600 Subject: [PATCH] Remove thunk / arity check in make-promise * libguile/promises.c (s_scm_make_promise): Remove arity check in make-promise. This was causing considerably slowdown with the new elf code, causing considerable number of bytevector reading calls on every call to (make-promise). Removing this check fixes a performance regression in the new compiler. --- libguile/promises.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libguile/promises.c b/libguile/promises.c index dcd0ac3..858b6f3 100644 --- a/libguile/promises.c +++ b/libguile/promises.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011 +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2015 * Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or @@ -77,7 +77,6 @@ SCM_DEFINE (scm_make_promise, "make-promise", 1, 0, 0, "@end lisp\n") #define FUNC_NAME s_scm_make_promise { - SCM_VALIDATE_THUNK (1, thunk); SCM_RETURN_NEWSMOB2 (scm_tc16_promise, SCM_UNPACK (thunk), SCM_UNPACK (scm_make_recursive_mutex ())); -- 2.1.4 --=-=-=--