From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joseph Mingrone Newsgroups: gmane.emacs.devel Subject: Re: Speed of keyboard macro execution? Date: Fri, 11 Dec 2015 22:14:28 -0400 Message-ID: <86egesbegr.fsf@phe.ftfl.ca> References: <20151209163954.0cefcc7f@jabberwock.cb.piermont.com> <87si3bcltu.fsf@isaac.fritz.box> <20151209180343.5a67c0e7@jabberwock.cb.piermont.com> <83r3iu9rvp.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1449886829 9743 80.91.229.3 (12 Dec 2015 02:20:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Dec 2015 02:20:29 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 12 03:20:15 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a7ZnC-0004BF-Vf for ged-emacs-devel@m.gmane.org; Sat, 12 Dec 2015 03:20:15 +0100 Original-Received: from localhost ([::1]:50244 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7ZnC-0001DJ-7N for ged-emacs-devel@m.gmane.org; Fri, 11 Dec 2015 21:20:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7Zn6-0001A9-Pf for emacs-devel@gnu.org; Fri, 11 Dec 2015 21:20:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7Zn3-0004Cf-KE for emacs-devel@gnu.org; Fri, 11 Dec 2015 21:20:08 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:54464) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7Zn3-0004BH-EM for emacs-devel@gnu.org; Fri, 11 Dec 2015 21:20:05 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1a7Zn2-0003k6-27 for emacs-devel@gnu.org; Sat, 12 Dec 2015 03:20:04 +0100 Original-Received: from hlfxns016cw-142167179056.dhcp-dynamic.fibreop.ns.bellaliant.net ([142.167.179.56]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 12 Dec 2015 03:20:04 +0100 Original-Received: from jrm by hlfxns016cw-142167179056.dhcp-dynamic.fibreop.ns.bellaliant.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 12 Dec 2015 03:20:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 63 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: hlfxns016cw-142167179056.dhcp-dynamic.fibreop.ns.bellaliant.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (berkeley-unix) Cancel-Lock: sha1:yONkMMhWfsj5oAxq9k0V50Wf4sI= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:196153 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii 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/=EF=BB=BF --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWa4MEAAoJEDakDIOw1u+ezxUP/1Balc67zh8fVF5jhZjR3H25 Ds6eqPfWndNsVyZeOBLUgdBur+FNt1/GN9pmbajW9UQpsd44ssxj2xUJ+WliMU3S aMiqdL7j/bymMn7SQjSkKLY3jvTFUnFwIMKCLuayuvdE7dFNLw3OctqkMdIGr5lU Nqb6M3bAGWibdw3rPBoUfDw29xADplkAHEfS7Gr20hqTgMnjBiEpMdFJhehP3F05 unU03eqvNSg52uvzsudICEWfMDU7y2svrFnrLGpkNCLXG0BGYQX9EA+5wRD4+aFj zf2D49duKqS4XkfP6VEMmPDaos5kB56R2tkeRa9RFhX4cr80kaXBfQLbDFjvdK5b X61kLFUeuVFTzD5ZLGxwSNTaXvdunW4TepH7Fig6ClW7YpQVqbp3awx7OfxfOZkf 5QSmKF7DRWv+1t9jionvQPTxGb1n9OcgEb/GQOvBLEtIMi5Eh3pRVJGVnDNLk63x GBHdJpOljLggNR8O2bwZ5nqPDgOxzf/2XsodAVQ4YsfRKTC6J6Y3FqGlbVj68O3y ZiL8RKS5kuJRroT6ZsxITEdTZ8RHB7H1Dx4m5sV3QaJV0aylYhCWVB2LvY3l6CU/ gpLsBuFURB8KNUWzAV9qdiXi/WbvEl0fddEkG2dWajJn2nl7szTQUVKERJX9+oeU mUSZDx2/VwH6D343/b9K =7D1p -----END PGP SIGNATURE----- --=-=-=--