diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2022-03-03 13:57:26 +0100 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2022-03-12 17:32:31 +0100 |
commit | 2fb98486e18f8a3275adc56d2740901ef5cb6e8b (patch) | |
tree | 29e1f5e589138f8b201f299bcb2843be4849688f /test/lisp/emacs-lisp/unsafep-tests.el | |
parent | fe65db05f42bcbf755f037575b3c29b74f279bdf (diff) | |
download | emacs-2fb98486e18f8a3275adc56d2740901ef5cb6e8b.tar.gz emacs-2fb98486e18f8a3275adc56d2740901ef5cb6e8b.tar.bz2 emacs-2fb98486e18f8a3275adc56d2740901ef5cb6e8b.zip |
Faster bytecode immediate argument fetching
* src/bytecode.c (FETCH2):
Use `|` instead of `+` to combine the bytes forming a 16-bit immediate
argument so that GCC (prior to version 12) recognises the idiom and
generates a 16-bit load. This applies for little-endian machines with
cheap unaligned accesses such as x86[-64], arm64 and power64le.
This 1-character change results in a measurable speed gain on many
kinds of Lisp code, as 16-bit immediates are used by all jump
instructions.
Clang performs this optimisation for both `+` and `|` from version 10.
Diffstat (limited to 'test/lisp/emacs-lisp/unsafep-tests.el')
0 files changed, 0 insertions, 0 deletions