From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: spacecadet Newsgroups: gmane.lisp.guile.bugs Subject: bug#72688: big lets are deathly slow Date: Sat, 17 Aug 2024 20:47:03 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2655"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 To: 72688@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sat Aug 17 22:50:53 2024 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sfQNx-0000WF-Ko for guile-bugs@m.gmane-mx.org; Sat, 17 Aug 2024 22:50:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sfQNU-0003DT-RG; Sat, 17 Aug 2024 16:50:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sfQNT-0003DJ-Pg for bug-guile@gnu.org; Sat, 17 Aug 2024 16:50:23 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sfQNT-0002MO-F1 for bug-guile@gnu.org; Sat, 17 Aug 2024 16:50:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=From:MIME-Version:Date:To:Subject; bh=XR8V7nmg8gzbCXGRGUIqnkqo4htxjeSJOrXylT2Pojg=; b=qCQsscR5Mi9SzVBo4iPF3YDXlO04oMNUhctIOiUifILsjLeP/dJ7F0yciP+HPEpomQ+kWUjWW8T0Eu4xyUZLJBV8nFzbwnfAuQ2DENf1prCzSDkZvptVINH5m9zuy15BDabNiOSkx1ixBRHiNOBSAyHLRqEuAeO9dB+ZRHS6OMu3BTHCenc4OJ5KtyZbhDXH6OJCDJ+FYotlkgv1v4Yr0PNAoL1n1hYFMJ+F8/UiOCrvR7y0fnXa20liVnweQoRoEtfL2JqKl3k/CIVA7YBNjhhNIL7at+ndrJ9ml65WUeuRp6jrnaIpXfPYPN5xYWZ9eC5S3VG1qjpw67GES8oeWQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sfQO6-0004Ot-AR for bug-guile@gnu.org; Sat, 17 Aug 2024 16:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: spacecadet Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 17 Aug 2024 20:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72688 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.172392780616829 (code B ref -1); Sat, 17 Aug 2024 20:51:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Aug 2024 20:50:06 +0000 Original-Received: from localhost ([127.0.0.1]:55028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfQNC-0004NN-E0 for submit@debbugs.gnu.org; Sat, 17 Aug 2024 16:50:06 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:51314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfQNA-0004NF-Nt for submit@debbugs.gnu.org; Sat, 17 Aug 2024 16:50:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sfQKR-0002zU-49 for bug-guile@gnu.org; Sat, 17 Aug 2024 16:47:15 -0400 Original-Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sfQKP-0001gp-9F for bug-guile@gnu.org; Sat, 17 Aug 2024 16:47:14 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 2B6B4C0002 for ; Sat, 17 Aug 2024 20:47:06 +0000 (UTC) Content-Language: en-US X-GND-Sasl: spacecadet@purge.sh Received-SPF: pass client-ip=2001:4b98:dc4:8::226; envelope-from=spacecadet@purge.sh; helo=relay6-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:10955 Archived-At: performance of let seems to be about O(n^2) for n bindings bash script to reproduce range="$1" time guile --no-auto-compile <( printf "(let ("; for i in $(seq 0 $range); do printf "(foo%s 'bar)" $i; done; printf ") '())" ) $ ./let.sh 10000 real 0m1.059s user 0m1.306s sys 0m0.064s $ ./let.sh 20000 real 0m3.901s user 0m4.197s sys 0m0.078s $ ./let.sh 40000 real 0m14.955s user 0m15.707s sys 0m0.188s $ ./let.sh 80000 ./let.sh: line 2: 6182 Segmentation fault guile --no-auto-compile <( printf '(let ('; for i in $(seq 0 $range); do printf '(foo%s '"'"'bar)' $i; done; printf ") '())" ) real 0m58.146s user 0m59.156s sys 0m0.326s