Next: Tips for Avoiding Compiler Warnings, Previous: Emacs Programming Tips, Up: Tips and Conventions [Contents][Index]
D.4 Tips for Making Compiled Code FastHere are ways of improving the execution speed of byte-compiled Lisp programs.
memq
, member
, assq
, or assoc
is even faster than explicit iteration. It can be worth rearranging a data structure so that one of these primitive search functions can be used.byte-compile
property. If the property is non-nil
, then the function is handled specially.
For example, the following input will show you that aref
is compiled specially (see Functions that Operate on Arrays):
(get 'aref 'byte-compile) ⇒ byte-compile-two-args
Note that in this case (and many others), you must first load the bytecomp library, which defines the byte-compile
property.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4