From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Benninghofen, Benjamin Dr." Newsgroups: gmane.emacs.bugs Subject: bug#32729: Xemacs 23 times as fast as GNU Emacs Date: Thu, 13 Sep 2018 13:32:48 +0000 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_c3a9871dbc0a42c799d7368e2b6457b2CD14DDAG02P01cdmailcomm_" X-Trace: blaine.gmane.org 1536851554 8532 195.159.176.226 (13 Sep 2018 15:12:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Sep 2018 15:12:34 +0000 (UTC) Cc: Kevin Layer To: 32729@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 13 17:12:30 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0TID-000256-Fs for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Sep 2018 17:12:29 +0200 Original-Received: from localhost ([::1]:42998 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0TKK-0004wP-3B for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Sep 2018 11:14:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0TJo-0004kN-FP for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2018 11:14:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0TJj-0003AW-Eh for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2018 11:14:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35115) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g0TJj-0003AS-B2 for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2018 11:14:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g0TJj-0006IY-6a for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2018 11:14:03 -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: Thu, 13 Sep 2018 15:14:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32729 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Original-Received: via spool by submit@debbugs.gnu.org id=B.153685162424155 (code B ref -1); Thu, 13 Sep 2018 15:14:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Sep 2018 15:13:44 +0000 Original-Received: from localhost ([127.0.0.1]:39371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0TJP-0006HS-IF for submit@debbugs.gnu.org; Thu, 13 Sep 2018 11:13:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39899) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0Rkc-0003Se-60 for submit@debbugs.gnu.org; Thu, 13 Sep 2018 09:33:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0RkQ-0007vp-RP for submit@debbugs.gnu.org; Thu, 13 Sep 2018 09:33:36 -0400 Original-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 ) id 1g0RkQ-0007vi-NV for submit@debbugs.gnu.org; Thu, 13 Sep 2018 09:33:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0RkP-0005Vj-0q for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2018 09:33:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0RkH-0007du-OE for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2018 09:33:27 -0400 Original-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 ) id 1g0RkE-0007El-Cx for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2018 09:33:19 -0400 X-IronPort-AV: E=Sophos; i="5.53,369,1531778400"; d="scan'208,217"; a="39201171" Original-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 Original-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 Original-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 Original-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 Original-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 Thread-Topic: Xemacs 23 times as fast as GNU Emacs Thread-Index: AdRLYcBdLvyutlnaQiCCkSAhjOwdQg== Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted 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-Mailman-Approved-At: Thu, 13 Sep 2018 11:13:41 -0400 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: 208.118.235.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:150287 Archived-At: --_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
I did send an email with the same subject earlier, but its attachment = was probably 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&qu= ot; buffer "~/prog.sh"))
      (set-process-filter proc 'demo-process-= filter)))
 
(defun demo-process-filter (process output)
    (let* ((xmarker (process-mark process))
           (marker (if (m= arker-position xmarker)
           &nbs= p;           xmarker
           &nbs= p;         (set-marker (make-marker) 0 b= uffer)))
           (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 d= irectory:
 
#! /bin/bash
  start=3D$(date +%s)
  echo sleeping 5 to wait for process filter to get installed...<= /div>
  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 t= han 80 characters.
 
 
The file I used was created with the following ANSI-COMMON-LISP functi= on:
 
(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 &quo= 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 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.
If you are= not the intended recipient, please notify Airbus immediately and delete th= is e-mail.
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.
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.
--_000_c3a9871dbc0a42c799d7368e2b6457b2CD14DDAG02P01cdmailcomm_--