unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathias Dahl <mathias.dahl@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: Abbrev suggestions - feedback appreciated
Date: Tue, 19 May 2020 00:00:00 +0200	[thread overview]
Message-ID: <CABrcCQ5gRg70xapwxazUK8OfG4Fvvd5Mbg1HtvWRLx7ZGQOTcQ@mail.gmail.com> (raw)
In-Reply-To: <jwvftby8dko.fsf-monnier+emacs@gnu.org>

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

>
> BTW, your profiles seemed to indicate you were profiling the
> interpreted code.
> Is the above benchmark applied to code that was byte-compiled or not?
>

It was interpreted code :) I byte compiled the file, loaded it and made new
benchmarks (100 runs):

Old function, interpreted:

(8.512507332 115 3.1926403050000003)

New function, interpreted:

(10.542568204 163 4.423713608)

Old function, byte-compiled:

(7.071314908000001 88 2.3837053029999993)

New function, byte-compiled :

(6.988860584 74 2.041772453)

I also tested with the whole abbrev.el interpreted (I did M-x eval-buffer
on it, which I hope will "undo" most byte-compiled code) and then both
versions took around 20 seconds instead of the above.

My take on this now is that, at least from a "speed" perspective (Eli says
we cannot measure memory consumption in a good way), both functions are
equivalent and I would rather keep the old version that uses the
intermediate list of expansions, for readability. Also don't forget that
we're talking about insane amounts of abbrevs here still (10,000).

Would you agree with my conclusion or do you still want to see the version
that should be better in theory?

/Mathias

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

  reply	other threads:[~2020-05-18 22:00 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-16  7:51 Abbrev suggestions - feedback appreciated Mathias Dahl
2017-09-16  8:46 ` Eli Zaretskii
2017-09-17 13:15   ` Mathias Dahl
2017-09-16 13:22 ` Stefan Monnier
2017-09-17 13:22   ` Mathias Dahl
2017-09-17 14:03     ` Mathias Dahl
2017-09-17 21:23     ` Stefan Monnier
2017-09-17 21:56       ` Mathias Dahl
2017-10-03 12:51         ` Kaushal Modi
2017-10-07 15:13           ` Mathias Dahl
2017-10-07 15:29             ` Stefan Monnier
2017-10-07 17:18               ` Mathias Dahl
2017-10-07 18:40                 ` Mathias Dahl
2017-10-07 22:29                   ` Ian Dunn
2017-10-07 22:44                     ` Stefan Monnier
2017-10-08 16:38                       ` Ian Dunn
2018-09-17 21:48                         ` Mathias Dahl
2018-09-18  2:05                           ` Stefan Monnier
2020-05-11 21:37                             ` Mathias Dahl
2020-05-11 22:39                               ` Mathias Dahl
2020-05-11 22:58                               ` Stefan Monnier
2020-05-16 22:10                                 ` Mathias Dahl
2020-05-16 22:22                                   ` Mathias Dahl
2020-05-17  3:13                                     ` Stefan Monnier
2020-05-17 14:59                                       ` Mathias Dahl
2020-05-17 15:45                                         ` Eli Zaretskii
2020-05-17 18:43                                           ` Mathias Dahl
2020-05-17 21:20                                             ` Stefan Monnier
2020-05-18 22:00                                               ` Mathias Dahl [this message]
2020-06-04 20:14                                                 ` Mathias Dahl
2017-10-07 22:40                 ` Stefan Monnier
2017-10-08 15:28                   ` Mathias Dahl
  -- strict thread matches above, loose matches on Subject: below --
2017-10-08  8:15 Seweryn Kokot
2017-10-08 15:25 ` Mathias Dahl

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=CABrcCQ5gRg70xapwxazUK8OfG4Fvvd5Mbg1HtvWRLx7ZGQOTcQ@mail.gmail.com \
    --to=mathias.dahl@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).