[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#55676: [PATCH] non-recursive Lisp reader
From: |
Mattias Engdegård |
Subject: |
bug#55676: [PATCH] non-recursive Lisp reader |
Date: |
Fri, 27 May 2022 15:33:35 +0200 |
You probably saw this one coming. It's a restructuring of the Lisp reader so
that it no longer uses recursion for reading nested data structures.
The primary motivation is eliminating the limitation of the C stack (and
potential overflow crash). As a happy side-effect, the change improves reader
performance by a few percent, exact amount depending on what is being read.
This translates into a small but measurable speed-up in loading packages (.el
and .elc), and in byte-compilation. The performance increase is both from
removal of recursion and closer attention to performance.
Care has been taken to not change the reader behaviour, although some error
handling may differ in unimportant ways. Some obvious bugs found during the
conversion have been fixed: for example, #_ followed by whitespace now
represents the interned empty symbol; previously, it gave an unintended empty
symbol. A non-breaking space after a single dot now results in the dot token
instead of the dot as a symbol.
lread-nonrec.diff
Description: Binary data
- bug#55676: [PATCH] non-recursive Lisp reader,
Mattias Engdegård <=