summaryrefslogtreecommitdiffstats
path: root/2021/talks/faster.md
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2021-12-02 01:23:52 -0500
committerSacha Chua <sacha@sachachua.com>2021-12-02 01:23:52 -0500
commit3b6a2c161825236f442727107b02d30a4b4c0c70 (patch)
treed604edeb2cfca73cd654abde2745a51f831a2540 /2021/talks/faster.md
parent532bc5cda6dc0f094e9adcfdadfdc7bf435779f0 (diff)
downloademacsconf-wiki-3b6a2c161825236f442727107b02d30a4b4c0c70.tar.xz
emacsconf-wiki-3b6a2c161825236f442727107b02d30a4b4c0c70.zip
IRC notes from day 2
Diffstat (limited to '2021/talks/faster.md')
-rw-r--r--2021/talks/faster.md19
1 files changed, 17 insertions, 2 deletions
diff --git a/2021/talks/faster.md b/2021/talks/faster.md
index 43d30743..28b89b5d 100644
--- a/2021/talks/faster.md
+++ b/2021/talks/faster.md
@@ -7,8 +7,6 @@
# Optimizing Emacs Lisp Code
Dmitry Gutov
-
-
[[!inline pages="internal(2021/info/faster-schedule)" raw="yes"]]
[[!table header="no" class="speaker-details" data="""
@@ -28,6 +26,23 @@ Preferred contact info | <dgutov@yandex.ru>
the bottleneck is. How to quickly load a byte-compiled version.
- Steps taken to speed up the Xref package recently.
+# Discussion
+
+IRC nick: dgutov
+
+- If somebody wants to do a remote session with me: I do have processes such as updating column view dynamic blocks that take maybe 40 minutes. So far, I avoid executing those functions when I'm around the computer myself. However, there may be room for improvement and I really can't tell wether it is in my personal setup or not because it's not always that easy to re-create a use-case with plain Emacs cnofig
+- Thanks for doing this talk. FYI you might find the this bench-multi-lexical macro useful: https://alphapapa.github.io/emacs-package-dev-handbook/#outline-container-Optimization
+ - dgutov: I can't seem to find the exact macro you are referring to. But if it covers a use case benchmark-progn does not, consider contributing it to benchmark.el in the core.
+ - Sorry, try this link directly to that macro: https://github.com/alphapapa/emacs-package-dev-handbook#bench-multi-lexical The purpose of the macro is to compare different forms and show how they perform relative to each other
+ - dgutov: Ah yeah, that looks pretty cool. Less sure about the org format, but it must be nice for presentations.
+ - The Org format is good for documentation too. But it just uses the output of benchmark-run, so it could easily be left in Lisp form. :)
+ - dgutov: These things are really handy to have available in 'emacs -Q', though. When you're working on shaving some extra handful of percents.
+ - Yes, a few lines of code could be added to run the compiled code in a separate Emacs process.
+- https://github.com/alphapapa/emacs-package-dev-handbook compares some common ways to do common things in Elisp so you can see which is generally faster, e.g. https://github.com/alphapapa/emacs-package-dev-handbook#inserting-strings
+- PSA: buffer-local-value is generally much faster than with-current-buffer if all you need to do is get the value of a variable in a buffer
+- For more info about the performance of overlays vs text properties data structure, there's an Emacs TODO about it. C-h C-t and search for "Move overlays to intervals.c".
+- cl-defstruct getters/setters have compiler macros that expand into simple aref calls on vectors, they are very efficient
+
[[!inline pages="internal(2021/captions/faster)" raw="yes"]]
[[!inline pages="internal(2021/info/faster-nav)" raw="yes"]]