miniblog.
← Back to all posts
Nov 1, 2016 at 03:49
Emacs tip of the day: annotate your functions! The byte compiler can replace entire function calls at compile time if your function is pure.
Wilfred Hughes
Related Posts
Dec 12, 2016 at 08:19
Emacs tip: add lexical-binding: t to your elisp files. This makes closures easier to reason about and lets the byte compiler find more bugs.
Wilfred Hughes
Shared words: Emacs, tip, byte, compiler Score: 101.6
Apr 23, 2016 at 10:33
Emacs tip: getting garbage in a traceback from byte-compiled functions? Go to the last function's definition and do eval-buffer in the file.
Wilfred Hughes
Shared words: Emacs, tip, functions, byte Score: 100.8
Feb 7, 2017 at 23:40
You can actually teach the Emacs byte-compiler to use specific opcodes for your functions! I've made dash.el faster:
Ensure that -first-item is as fast as car by Wilfred · Pull Request #210 · magnars/dash.el
Add symbol properties to -first-item so the byte-compiler compiles calls to the car opcode. This ensures that -first-item has the same performance as car. Add symbol properties to -first-item so th...
Wilfred Hughes
Shared words: Emacs, functions, byte, compiler Score: 95.8