GNU bug report logs - #32729
Xemacs 23 times as fast as GNU Emacs

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: "Benninghofen, Benjamin Dr." <benjamin.benninghofen@HIDDEN>; merged with #32728; dated Thu, 13 Sep 2018 15:14:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Merged 32728 32729. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Sep 2018 15:13:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 13 11:13:44 2018
Received: from localhost ([127.0.0.1]:39371 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1g0TJP-0006HS-IF
	for submit <at> debbugs.gnu.org; Thu, 13 Sep 2018 11:13:43 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39899)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <benjamin.benninghofen@HIDDEN>)
 id 1g0Rkc-0003Se-60
 for submit <at> debbugs.gnu.org; Thu, 13 Sep 2018 09:33:42 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <benjamin.benninghofen@HIDDEN>)
 id 1g0RkQ-0007vp-RP
 for submit <at> debbugs.gnu.org; Thu, 13 Sep 2018 09:33:36 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:53034)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <benjamin.benninghofen@HIDDEN>)
 id 1g0RkQ-0007vi-NV
 for submit <at> debbugs.gnu.org; Thu, 13 Sep 2018 09:33:30 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:60814)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <benjamin.benninghofen@HIDDEN>)
 id 1g0RkP-0005Vj-0q
 for bug-gnu-emacs@HIDDEN; Thu, 13 Sep 2018 09:33:30 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <benjamin.benninghofen@HIDDEN>)
 id 1g0RkH-0007du-OE
 for bug-gnu-emacs@HIDDEN; Thu, 13 Sep 2018 09:33:27 -0400
Received: from mo1.myeers.net ([87.190.7.232]:32795)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <benjamin.benninghofen@HIDDEN>)
 id 1g0RkE-0007El-Cx
 for bug-gnu-emacs@HIDDEN; Thu, 13 Sep 2018 09:33:19 -0400
X-IronPort-AV: E=Sophos;i="5.53,369,1531778400"; d="scan'208,217";a="39201171"
Received: from unknown (HELO DE0-44HUB-P04.central.mail.corp) ([44.225.67.45])
 by de0-03iro-p02-out.myeers.net with ESMTP/TLS/AES256-SHA;
 13 Sep 2018 15:33:09 +0200
Received: from esa1e.demail.de.airbusds.corp (10.67.144.33) by
 DE0-44HUB-P04.central.mail.corp (44.225.67.47) with Microsoft SMTP Server id
 15.0.1365.1; Thu, 13 Sep 2018 15:33:04 +0200
Received: from unknown (HELO CD1-4DDAG02-P02.cdmail.common.airbusds.corp)
 ([10.67.164.144])
 by esa1i.demail.de.airbusds.corp with ESMTP; 13 Sep 2018 15:33:04 +0200
Received: from CD1-4DDAG02-P01.cdmail.common.airbusds.corp (10.67.164.142) by
 CD1-4DDAG02-P02.cdmail.common.airbusds.corp (10.67.164.144) with
 Microsoft
 SMTP Server (TLS) id 15.0.1365.1; Thu, 13 Sep 2018 15:32:47 +0200
Received: from CD1-4DDAG02-P01.cdmail.common.airbusds.corp ([10.67.164.142])
 by CD1-4DDAG02-P01.cdmail.common.airbusds.corp ([10.67.164.142]) with mapi id
 15.00.1365.000; Thu, 13 Sep 2018 15:32:48 +0200
From: "Benninghofen, Benjamin Dr." <benjamin.benninghofen@HIDDEN>
To: "bug-gnu-emacs@HIDDEN" <bug-gnu-emacs@HIDDEN>
Subject: Xemacs 23 times as fast as GNU Emacs
Thread-Topic: Xemacs 23 times as fast as GNU Emacs
Thread-Index: AdRLYcBdLvyutlnaQiCCkSAhjOwdQg==
Date: Thu, 13 Sep 2018 13:32:48 +0000
Message-ID: <c3a9871dbc0a42c799d7368e2b6457b2@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-ms-exchange-transport-fromentityheader: Hosted
Content-Type: multipart/alternative;
 boundary="_000_c3a9871dbc0a42c799d7368e2b6457b2CD14DDAG02P01cdmailcomm_"
MIME-Version: 1.0
X-GM-Security: forwarded
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 13 Sep 2018 11:13:41 -0400
Cc: Kevin Layer <layer@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.1 (-----)

--_000_c3a9871dbc0a42c799d7368e2b6457b2CD14DDAG02P01cdmailcomm_
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable

I did send an email with the same subject earlier, but its attachment was p=
robably lost.

Now I inserted the contents of the attachments in the email text.


The versions of Xemacs and GNU Emacs are those that come with RHEL 7.5.

To reproduce the benchmark:

Evaluate this in Emacs-Lisp


(defun demo ()
    (interactive)
    (let ((buffer (get-buffer-create "*demo*"))
          proc)
      (switch-to-buffer buffer)
      (erase-buffer)
      (setq proc (start-process "demo" buffer "~/prog.sh"))
      (set-process-filter proc 'demo-process-filter)))

(defun demo-process-filter (process output)
    (let* ((xmarker (process-mark process))
           (marker (if (marker-position xmarker)
                       xmarker
                     (set-marker (make-marker) 0 buffer)))
           (marker-point (marker-position marker)))
      (goto-char marker-point)
      (insert output)
      (set-marker marker (point))))

Place a file "prog.sh" with the contents below in the home directory:

#! /bin/bash
  start=3D$(date +%s)
  echo sleeping 5 to wait for process filter to get installed...
  sleep 5
  while read line; do
      echo $line
  done <<< "$(cat input.txt)"
  end=3D$(date +%s)
  echo duration: $(( end - start )) seconds




Furthermore a large text file "input.txt"  is needed in the home directory.=
 The file should have 1000000 lines, each line longer than 80 characters.


The file I used was created with the following ANSI-COMMON-LISP function:

(defun print-nums (&key (first 1) (last 1000000))
  (check-type first fixnum)
  (check-type last fixnum)
  (loop for k of-type fixnum from first to last do (format t "~%~B ^3 =3D ~=
B" k (expt k 3)))
  t)

Alternatively the "input.txt" file can be created as follows:

#! /bin/bash
  last=3D1000000
  function base2 {
      echo "obase=3D2;$1" | bc
  }
  for k in $(seq 1 $last); do
      x=3D$(( k * k * k ))
      echo $(base2 $k) '^3 =3D' $(base2 $x)
  done

generate the input like this:

  $ ./gen.sh > input.txt



The benchmark is executed by
(M-x) demo

At the end the time is printed and I received the following results:

Xemacs    : 51 seconds
GNU Emacs : 1205 seconds

So the Xemacs is more than 23 times as fast as the GNU Emacs.

---
Benjamin Benninghofen


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.

--_000_c3a9871dbc0a42c799d7368e2b6457b2CD14DDAG02P01cdmailcomm_
Content-Type: text/html; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii">
<meta name=3D"Generator" content=3D"Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left:=
 #800000 2px solid; } --></style>
</head>
<body>
<font face=3D"Calibri" size=3D"2"><span style=3D"font-size:11pt;">
<div>I did send an email with the same subject earlier, but its attachment =
was probably lost.</div>
<div>&nbsp;</div>
<div>Now I inserted the contents of the attachments in the email text.</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>The versions of Xemacs and GNU Emacs are those that come with RHEL 7.5=
.</div>
<div>&nbsp;</div>
<div>To reproduce the benchmark:</div>
<div>&nbsp;</div>
<div>Evaluate this in Emacs-Lisp</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>(defun demo ()</div>
<div>&nbsp;&nbsp;&nbsp; (interactive)</div>
<div>&nbsp;&nbsp;&nbsp; (let ((buffer (get-buffer-create &quot;*demo*&quot;=
))</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; proc)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (switch-to-buffer buffer)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (erase-buffer)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (setq proc (start-process &quot;demo&qu=
ot; buffer &quot;~/prog.sh&quot;))</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (set-process-filter proc 'demo-process-=
filter)))</div>
<div>&nbsp;</div>
<div>(defun demo-process-filter (process output)</div>
<div>&nbsp;&nbsp;&nbsp; (let* ((xmarker (process-mark process))</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; (marker (if (m=
arker-position xmarker)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmarker</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; (set-marker (make-marker) 0 b=
uffer)))</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; (marker-point =
(marker-position marker)))</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (goto-char marker-point)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (insert output)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (set-marker marker (point))))</div>
<div>&nbsp;</div>
<div>Place a file &quot;prog.sh&quot; with the contents below in the home d=
irectory:</div>
<div>&nbsp;</div>
<div>#! /bin/bash</div>
<div>&nbsp; start=3D$(date &#43;%s)</div>
<div>&nbsp; echo sleeping 5 to wait for process filter to get installed...<=
/div>
<div>&nbsp; sleep 5</div>
<div>&nbsp; while read line; do</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo $line</div>
<div>&nbsp; done &lt;&lt;&lt; &quot;$(cat input.txt)&quot;</div>
<div>&nbsp; end=3D$(date &#43;%s)</div>
<div>&nbsp; echo duration: $(( end - start )) seconds</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>Furthermore a large text file &quot;input.txt&quot;&nbsp; is needed in=
 the home directory. The file should have 1000000 lines, each line longer t=
han 80 characters. </div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>The file I used was created with the following ANSI-COMMON-LISP functi=
on:</div>
<div>&nbsp;</div>
<div>(defun print-nums (&amp;key (first 1) (last 1000000))</div>
<div>&nbsp; (check-type first fixnum)</div>
<div>&nbsp; (check-type last fixnum)</div>
<div>&nbsp; (loop for k of-type fixnum from first to last do (format t &quo=
t;~%~B ^3 =3D ~B&quot; k (expt k 3)))</div>
<div>&nbsp; t)</div>
<div>&nbsp;</div>
<div>Alternatively the &quot;input.txt&quot; file can be created as follows=
:</div>
<div>&nbsp;</div>
<div>#! /bin/bash</div>
<div>&nbsp; last=3D1000000</div>
<div>&nbsp; function base2 {</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;obase=3D2;$1&quot; | bc</div>
<div>&nbsp; }</div>
<div>&nbsp; for k in $(seq 1 $last); do</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x=3D$(( k * k * k ))</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo $(base2 $k) '^3 =3D' $(base2 $x)</=
div>
<div>&nbsp; done</div>
<div>&nbsp;</div>
<div>generate the input like this:</div>
<div>&nbsp;</div>
<div>&nbsp; $ ./gen.sh &gt; input.txt</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>The benchmark is executed by </div>
<div>(M-x) demo</div>
<div>&nbsp;</div>
<div>At the end the time is printed and I received the following results:</=
div>
<div>&nbsp;</div>
<div>Xemacs&nbsp;&nbsp;&nbsp; : 51 seconds</div>
<div>GNU Emacs : 1205 seconds</div>
<div>&nbsp;</div>
<div>So the Xemacs is more than 23 times as fast as the GNU Emacs.</div>
<div>&nbsp;</div>
<div>---</div>
<div>Benjamin Benninghofen</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
</span></font>
<font style=3D"font-size: 9px;">The information in this e-mail is confident=
ial. The contents may not be disclosed or used by anyone other than the add=
ressee. Access to this e-mail by anyone else is unauthorised.<br>If you are=
 not the intended recipient, please notify Airbus immediately and delete th=
is e-mail.<br>Airbus cannot accept any responsibility for the accuracy or c=
ompleteness of this e-mail as it has been sent over public networks. If you=
 have any concerns over the content of this message or its Accuracy or Inte=
grity, please contact Airbus immediately.<br>All outgoing e-mails from Airb=
us are checked using regularly updated virus scanning software but you shou=
ld take whatever measures you deem to be appropriate to ensure that this me=
ssage and any attachments are virus free.</font></body>
</html>

--_000_c3a9871dbc0a42c799d7368e2b6457b2CD14DDAG02P01cdmailcomm_--





Acknowledgement sent to "Benninghofen, Benjamin Dr." <benjamin.benninghofen@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#32729; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 13 Sep 2018 15:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.