From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Benninghofen, Benjamin Dr." Newsgroups: gmane.emacs.bugs Subject: bug#32728: bug#32729: Xemacs 23 times as fast as GNU Emacs Date: Fri, 25 Oct 2019 06:38:16 +0000 Message-ID: References: <871rviobu2.fsf@gnus.org> <83imouo1jp.fsf@gnu.org> <87y2xplufp.fsf@gnus.org> <83r23hkqr3.fsf@gnu.org> <87k198bkrf.fsf@gnus.org> <834l0clbzt.fsf@gnu.org> <87r23fiu66.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="12358"; mail-complaints-to="usenet@blaine.gmane.org" Cc: "layer@franz.com" , "32729@debbugs.gnu.org" <32729@debbugs.gnu.org>, "32728@debbugs.gnu.org" <32728@debbugs.gnu.org> To: Lars Ingebrigtsen , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 25 09:00:23 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iNtaA-00030t-MX for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Oct 2019 09:00:22 +0200 Original-Received: from localhost ([::1]:56292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNta8-0002mH-JS for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Oct 2019 03:00:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35954) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNtFY-0007OL-5Z for bug-gnu-emacs@gnu.org; Fri, 25 Oct 2019 02:39:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNtFW-0000Sa-IC for bug-gnu-emacs@gnu.org; Fri, 25 Oct 2019 02:39:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56597) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iNtFW-0000SU-F0 for bug-gnu-emacs@gnu.org; Fri, 25 Oct 2019 02:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iNtFW-0003CD-80 for bug-gnu-emacs@gnu.org; Fri, 25 Oct 2019 02:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Benninghofen, Benjamin Dr." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Oct 2019 06:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32728 X-GNU-PR-Package: emacs Original-Received: via spool by 32728-submit@debbugs.gnu.org id=B32728.157198550812243 (code B ref 32728); Fri, 25 Oct 2019 06:39:02 +0000 Original-Received: (at 32728) by debbugs.gnu.org; 25 Oct 2019 06:38:28 +0000 Original-Received: from localhost ([127.0.0.1]:37185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNtEy-0003BJ-5j for submit@debbugs.gnu.org; Fri, 25 Oct 2019 02:38:28 -0400 Original-Received: from mo1.myeers.net ([87.190.7.232]:37247) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNtEw-0003Az-Kl; Fri, 25 Oct 2019 02:38:27 -0400 X-IronPort-AV: E=Sophos;i="5.68,227,1569276000"; d="scan'208";a="108953666" Original-Received: from ec2-44-225-67-160.us-west-2.compute.amazonaws.com (HELO DE0-03HUB-P03.central.mail.corp) ([44.225.67.160]) by de0-44iro-p02-out.myeers.net with ESMTP/TLS/AES256-SHA; 25 Oct 2019 08:38:19 +0200 Original-Received: from esa2e.demail.de.airbusds.corp (10.67.144.34) by DE0-03HUB-P03.central.mail.corp (44.225.67.164) with Microsoft SMTP Server id 15.0.1473.3; Fri, 25 Oct 2019 08:38:17 +0200 Original-Received: from unknown (HELO CD1-4DDAG02-P01.cdmail.common.airbusds.corp) ([10.67.164.142]) by esa2i.demail.de.airbusds.corp with ESMTP; 25 Oct 2019 08:38:16 +0200 Original-Received: from CD1-4BDAG02-P03.cdmail.common.airbusds.corp (10.67.164.139) by CD1-4DDAG02-P01.cdmail.common.airbusds.corp (10.67.164.142) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 25 Oct 2019 08:38:16 +0200 Original-Received: from CD1-4BDAG02-P03.cdmail.common.airbusds.corp ([10.67.164.139]) by CD1-4BDAG02-P03.cdmail.common.airbusds.corp ([10.67.164.139]) with mapi id 15.00.1473.003; Fri, 25 Oct 2019 08:38:16 +0200 Thread-Topic: bug#32729: Xemacs 23 times as fast as GNU Emacs Thread-Index: AQHVgLFJdXJGPCQprkOKuUrCkgOMJKdWnzbCgACsFgKAAO+gGYAAoE9/gAAQkl+AAOzrSYARIZUQ In-Reply-To: <87r23fiu66.fsf@gnus.org> Accept-Language: en-US Content-Language: en-US x-ms-exchange-transport-fromentityheader: Hosted X-GM-Security: forwarded X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:170149 Archived-At: For me your discussion about the performance problem appears very theoretic= al. Why do you not just compare the relevant GNU Emacs Source Code with the Xem= acs Source Code? Benjamin Benninghofen -----Original Message----- From: Lars Ingebrigtsen [mailto:larsi@gnus.org] = Sent: Monday, October 14, 2019 10:54 AM To: Eli Zaretskii Cc: layer@franz.com; 32729@debbugs.gnu.org; Benninghofen, Benjamin Dr.; 327= 28@debbugs.gnu.org Subject: Re: bug#32729: Xemacs 23 times as fast as GNU Emacs Actually, my benchmarking is somewhat wrong. start-process with a filter, but discard output: (let ((coding-system-for-read 'binary)) (kill-buffer (get-buffer-create " *zeroes*")) (benchmark-run 1 (let ((proc (start-process "dd" (get-buffer-create " *zeroes*") "dd" "if=3D/dev/zero" "bs=3D4096" "count=3D250000"))) (set-process-filter proc (lambda (proc string))) (while (and (process-live-p proc) (accept-process-output proc 1)))))) =3D> (18.828236636 59 13.315468088000017) filter, but insert the output: (let ((coding-system-for-read 'binary)) (kill-buffer (get-buffer-create " *zeroes*")) (benchmark-run 1 (let ((proc (start-process "dd" (get-buffer-create " *zeroes*") "dd" "if=3D/dev/zero" "bs=3D4096" "count=3D250000"))) (set-process-filter proc (lambda (proc string) (with-current-buffer (get-buffer " *zeroes*") (goto-char (point-max)) (insert string)))) (while (and (process-live-p proc) (accept-process-output proc 1)))))) =3D> (21.120281346 59 13.250166416000013) With the default filter: (let ((coding-system-for-read 'binary)) (kill-buffer (get-buffer-create " *zeroes*")) (benchmark-run 1 (let ((proc (start-process "dd" (get-buffer-create " *zeroes*") "dd" "if=3D/dev/zero" "bs=3D4096" "count=3D250000"))) (while (and (process-live-p proc) (accept-process-output proc 1)))))) =3D> (34.046986424 116 26.025843717999976) (!) So the default filter is really slow? Anyway, compare with call-process: (let ((coding-system-for-read 'binary)) (kill-buffer (get-buffer-create " *zeroes*")) (benchmark-run 1 (call-process "dd" nil (get-buffer-create " *zeroes*") n= il "if=3D/dev/zero" "bs=3D4096" "count=3D250000"))) =3D> (1.694743653 0 0.0) So what makes start-process 10x slower than call-process? If it is all the string creation before calling the filters, default or not, then my point stands, but this obviously requires a more in-depth dive into process.c. -- = (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no The information in this e-mail is confidential. The contents may not be dis= closed or used by anyone other than the addressee. Access to this e-mail by= anyone else is unauthorised. If you are not the intended recipient, please notify Airbus immediately and= delete this e-mail. Airbus cannot accept any responsibility for the accuracy or completeness of= this e-mail as it has been sent over public networks. If you have any conc= erns over the content of this message or its Accuracy or Integrity, please = contact Airbus immediately. All outgoing e-mails from Airbus are checked using regularly updated virus = scanning software but you should take whatever measures you deem to be appr= opriate to ensure that this message and any attachments are virus free.