From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: master 979308b4ca 5/9: org-export-data: Concatenate strings in temporary buffer for performance Date: Thu, 16 Jun 2022 15:33:06 +0200 Message-ID: <87ilp0ybql.fsf@gmail.com> References: <165536698076.5328.17316430648307086249@vcs2.savannah.gnu.org> <20220616080945.7DD14C01685@vcs2.savannah.gnu.org> <87zgicdbfd.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23119"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , emacs-devel@gnu.org, Ihor Radchenko To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jun 16 15:57:28 2022 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 1o1q00-0005ro-FO for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Jun 2022 15:57:28 +0200 Original-Received: from localhost ([::1]:60586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1pzz-0000OL-4d for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Jun 2022 09:57:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1pcW-0001gk-DF for emacs-devel@gnu.org; Thu, 16 Jun 2022 09:33:12 -0400 Original-Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:42640) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1pcU-00025O-26 for emacs-devel@gnu.org; Thu, 16 Jun 2022 09:33:12 -0400 Original-Received: by mail-wr1-x432.google.com with SMTP id s1so1901762wra.9 for ; Thu, 16 Jun 2022 06:33:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=5z3CIMRVNghYBNP3B9JH96VsqiEe+7ahr5+Th7Dh/1I=; b=T8qODiDAR7v0jORo6c8xMdzwf80QiFYjxCVxmm+haFxm2mr0gTNneRVNe+0kVnxH0C GAbh7UqXvREpIdtJ1glv77TIDUFtOpRPHNAyALOjBrPyzvJPsJF+fLMdf+n//jcBl8uU GP62Y+JcGQJB7dvWBpEHOoGVZCpVeCsMN5HD8eX0h0SckXzEv8xruEg6MToh4AjxfoEG 99GvyQYXoI+DVcb9y0tIgtA8EyPrA6Nkt7lKzxd1CaCINw4G8PqLFMa6fod/cwEwvjkK EYcxGAWGz7UBIgb0aNmRYw8GbKzH7ya3MTAb3Hq+uPjOcYzC+60cBz4wJDvjSMY7SNCk 3h4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=5z3CIMRVNghYBNP3B9JH96VsqiEe+7ahr5+Th7Dh/1I=; b=AAR2gS+oOnu0WwqaNQmJGZu6ZpW4GHMrNFtlas/KtrUxoBjmpVq1xo15vgSIdOHiKx bXaHxBN9mxuvnWudr+CDTqSty9eqSdEyiX7yIeuPocniZ5Ze6QCW+NdTJnou+Zc3+d9b HggX+vvKmkFAJczAgsxthfi8C4FoFacfU7IuLYwdKMUYB2N5EKfZ+FtD3+Y/1MQWVE9t M/rYWrAWZcIIxpN4gwLMhwXizRfuH0lSq17j5GqFfGakf9JaDZun5qPJJz6COR5UgT8N tX9i0in4z+BUV4/2qiV7kd0IsC0vRWuBhLX2d/omz6LYmrHOPjm9YCPZ0kxxpsCeoHMd Srlg== X-Gm-Message-State: AJIora8q1EH3r5LF1lKdONpb5bYR4ncJW0QjkzX8SZy35/JBCiDTdu4e URXG/zLaMiQzH2p+9BL3GnfuLoe+KMdoiQ== X-Google-Smtp-Source: AGRyM1uBLaLN+ggvRimWrtPE9xffjF5ChMD4tYciwOud+oSppsF11MGiepvX5dHcujxLixCeYsla2A== X-Received: by 2002:a5d:6283:0:b0:213:b939:826d with SMTP id k3-20020a5d6283000000b00213b939826dmr4520797wru.543.1655386387973; Thu, 16 Jun 2022 06:33:07 -0700 (PDT) Original-Received: from rltb ([2a01:e0a:3f3:fb50:8979:61cf:f959:2756]) by smtp.gmail.com with ESMTPSA id x17-20020a5d60d1000000b00219fb3a275csm1934032wrt.16.2022.06.16.06.33.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 06:33:07 -0700 (PDT) Gmane-Reply-To-List: yes In-Reply-To: <87zgicdbfd.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 16 Jun 2022 14:45:26 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=rpluim@gmail.com; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:291247 Archived-At: >>>>> On Thu, 16 Jun 2022 14:45:26 +0200, Lars Ingebrigtsen said: Lars> Stefan Monnier writes: >> AFAICT this just replaces `mapconcat` with a `with-temp-buffer + dol= ist >> + insert`, so if this makes a significant performance difference, it >> points to a performance problem in our `mapconcat`, right? Lars> It looks like it shouldn't be that difficult to improve the perfo= rmance Lars> radically in the common case of FUNCTION being #'identity. If th= ere's Lars> no SEPARATOR we can just pass the arguments more or less directly= on to Lars> Fconcat, and if there is a SEPARATOR, we just have to adjust the = arg Lars> list. I did some profiling of concat and similar about a year ago. One of the things that got me some improvement was adjusting the type checks so that the most common case came first. Of course that=CA=BCs highly dependent on which benchmarks you choose :-) Robert --=20