]> git.eshelyaron.com Git - emacs.git/commit
Replace read_objects assoc list with two hash tables.
authorKen Raeburn <raeburn@raeburn.org>
Sun, 30 Oct 2016 13:05:46 +0000 (09:05 -0400)
committerKen Raeburn <raeburn@raeburn.org>
Thu, 22 Jun 2017 02:34:33 +0000 (22:34 -0400)
commitb91455633b03add918af3eb166ac797fd6c95722
tree8291ac7adfcf7f60d3fe7560db0d90175122c8a4
parentefe200c10da02db68c6eeadc3cd82a8cc3108c96
Replace read_objects assoc list with two hash tables.

For larger input files with lots of shared data structures, an
association list is too slow.

* src/lread.c (read_objects_map, read_objects_completed): New
variables, replacing read_objects.
(readevalloop): Initialize them with hash tables before starting a
top-level read, if they're not already empty hash tables, and reset
them to Qnil afterwards if something was added to the hash tables.
(read_internal_start): Likewise.
(read1): Store first the placeholder and later the newly read object
into read_objects_map under the specified object number.  If the new
object can contain a reference to itself, store it in
read_objects_completed.
(substitute_objects_recurse): Check read_objects_completed instead of
read_objects for the known possibly-recursive objects.
(syms_of_lread): Update initializations.
src/lread.c