emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Speed of keyboard macro execution?


From: Joseph Mingrone
Subject: Re: Speed of keyboard macro execution?
Date: Fri, 11 Dec 2015 22:14:28 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (berkeley-unix)

Eli Zaretskii <address@hidden> writes:
> It's a bit disingenuous on the part of that person to compare Emacs
> with another editor _solely_ where there's a known inefficiency in
> Emacs, and pretend that this is somehow representative of the general
> differences in performance between these two editors.  After all, how
> frequently do you need to edit files with lines in excess of 11K
> characters?

The intention wasn't to be misleading or trash Emacs, but to highlight
an area ripe for improvement.  I also assumed it was common knowledge
for anyone that would be interested in such an esoteric topic that mg
is a shell of Emacs in terms of features, so the comparison is
"contrived".

Below is a comment I added to the video shortly after it was posted.

Following the discussions on Reddit [1] and more testing, it's clear
that the major difference in speed was a result of certain operations
within the macros than the macros themselves.

emacs -nw -Q:

Slow:
M-: (while (< (point) (point-max)) (end-of-line) (insert ",")
(next-line) (beginning-of-line nil))

Within a second or two:
Define a macro with M-x end-of-line / , / C-f and run it 3869 times.

Instantaneous:
M-: (while (< (point) (point-max)) (end-of-line) (insert ",")
(forward-line 1))
M-: (replace-regexp "$" ",")

[1] 
https://www.reddit.com/r/emacs/comments/3vp583/macros_in_gnu_emacs_and_mg_speed_comparison/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]