Use #N# syntax for repeated symbols in dumped.elc.
Parsing symbol names involves processing for possible multibyte
characters and comparisons against other symbol-name strings in the
obarray. The #N# syntax is simpler, uses an automatically resized
hash table keyed by integers, and is in most cases shorter, so reading
can be a little faster.
When doing this we have to avoid the special "," syntax because we
would wind up printing "#1=,foo" which reads back as setting #1# to
,foo when we really wanted to set #1# to just the comma symbol.
* src/print.c (syms_of_print): Define new Lisp variable
print-symbols-as-references.
(PRINT_CIRCLE_CANDIDATE_P): If it's set, accept interned symbols.
(print_preprocess): Update comment.
(print_object): When printing "," or related symbols with special
syntax, don't use print_object on the special symbol itself.
* lisp/loadup.el: Bind print-symbols-as-references to t while creating
the dumped.elc file.