From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: named-let Date: Sat, 09 Jan 2021 11:44:57 -0500 Message-ID: References: <87im86kub6.fsf@logand.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32124"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Tomas Hlavaty Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 09 17:46:50 2021 Return-path: Envelope-to: ged-emacs-devel@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 1kyHO5-0008FK-VM for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Jan 2021 17:46:49 +0100 Original-Received: from localhost ([::1]:45440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyHO5-0000G5-1s for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Jan 2021 11:46:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35172) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyHMP-00083e-1W for emacs-devel@gnu.org; Sat, 09 Jan 2021 11:45:05 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:31011) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyHMN-0003I7-7j for emacs-devel@gnu.org; Sat, 09 Jan 2021 11:45:04 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 48FEB10022E; Sat, 9 Jan 2021 11:45:00 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 9AB741000DA; Sat, 9 Jan 2021 11:44:58 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1610210698; bh=p/EB9Va5GpAJKkn6IOUcT4A2eSYgnGTS9Wr+djxV4YI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=LkPsYjRhPw9goQIEn5uc5M/pyBejFQLuecRXAq1BQvuB1tkVU5FpdEShBiUwSs6Cu Yhc0eAlcEjQRryk+XNevPk9ElA/kdGvBotz5l4l5T3obAKJKSVAwGqCuxZXJnkoS1k VqHckuuEmLiphj8JyU1YmnxR9t3lKufKmAoYNmCyt4t1J9Ht1DLAREE4H2QUCbecyS Zm9Z7mwkkXmxPK3DPyJU/TytLfykVOgySHQISOdbg/No2NCUearrsxBZfZDKzBXf+r 5LUGsrPxnEeLVXdOIJ8znklCZdKTYAlKpOwKdTNZlDJg6wNQNZb46OENmT3RDkujUa LIR2LIqqGxckw== Original-Received: from alfajor (unknown [45.72.224.181]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 550C312024D; Sat, 9 Jan 2021 11:44:58 -0500 (EST) In-Reply-To: <87im86kub6.fsf@logand.com> (Tomas Hlavaty's message of "Sat, 09 Jan 2021 16:23:57 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:262808 Archived-At: >> But with the recent tail-call optimization I installed into `master`, >> the above `my-length` now works without eating up stack space. > That's great news. Probably not as great as you think. > Is TCO always used (like in Scheme) or in which cases is it used or not used? It's basically never used. It's only applied for the particular case of tail recursive calls to functions defined by `cl-labels` and only for those calls that are "self-recursive" (i.e. come from within the code of that function). > Is it possible to turn it on or off? No. Stefan