all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Benninghofen, Benjamin Dr." <benjamin.benninghofen@airbus.com>
To: 32729@debbugs.gnu.org
Cc: Kevin Layer <layer@franz.com>
Subject: bug#32729: Xemacs 23 times as fast as GNU Emacs
Date: Thu, 13 Sep 2018 13:32:48 +0000	[thread overview]
Message-ID: <c3a9871dbc0a42c799d7368e2b6457b2@CD1-4DDAG02-P01.cdmail.common.airbusds.corp> (raw)

[-- Attachment #1: Type: text/plain, Size: 3069 bytes --]

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" 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=$(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=$(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 = ~B" k (expt k 3)))
  t)

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

#! /bin/bash
  last=1000000
  function base2 {
      echo "obase=2;$1" | bc
  }
  for k in $(seq 1 $last); do
      x=$(( k * k * k ))
      echo $(base2 $k) '^3 =' $(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 disclosed 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 concerns 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 appropriate to ensure that this message and any attachments are virus free.

[-- Attachment #2: Type: text/html, Size: 5541 bytes --]

             reply	other threads:[~2018-09-13 13:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-13 13:32 Benninghofen, Benjamin Dr. [this message]
2019-10-12  3:57 ` bug#32729: Xemacs 23 times as fast as GNU Emacs Lars Ingebrigtsen
2019-10-12  7:39   ` bug#32728: " Eli Zaretskii
2019-10-12 17:55     ` Lars Ingebrigtsen
2019-10-13  8:13       ` bug#32728: " Eli Zaretskii
2019-10-13 17:36         ` Lars Ingebrigtsen
2019-10-14  8:18           ` Eli Zaretskii
2019-10-14  8:36             ` bug#32728: " Lars Ingebrigtsen
2019-10-14  9:15               ` Eli Zaretskii
2019-10-13 17:47         ` Lars Ingebrigtsen
2019-10-13 18:46           ` Eli Zaretskii
2019-10-14  8:54             ` Lars Ingebrigtsen
2019-10-14 10:18               ` bug#32728: " Eli Zaretskii
2019-10-25  6:38               ` Benninghofen, Benjamin Dr.
2019-10-25  7:00                 ` Eli Zaretskii
2019-10-13 10:49   ` Phil Sainty
2019-10-13 17:24     ` bug#32728: " Lars Ingebrigtsen
2019-10-13 18:44       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c3a9871dbc0a42c799d7368e2b6457b2@CD1-4DDAG02-P01.cdmail.common.airbusds.corp \
    --to=benjamin.benninghofen@airbus.com \
    --cc=32729@debbugs.gnu.org \
    --cc=layer@franz.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.