emacs-devel
[Top][All Lists]
Advanced

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

Re: Abbrev suggestions - feedback appreciated


From: Mathias Dahl
Subject: Re: Abbrev suggestions - feedback appreciated
Date: Tue, 19 May 2020 00:00:00 +0200

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


reply via email to

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