* Pure nil and t?
@ 2014-09-22 8:38 Dmitry Antipov
2014-09-22 8:51 ` David Kastrup
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Antipov @ 2014-09-22 8:38 UTC (permalink / raw)
To: Emacs development discussions
For a long byte-compile runs, ~15-17% of objects seen by GC are nil and t
(especially nil, which is ~10x more "popular" than t). What about making
them pure? Thus way they will be quickly filtered out by PURE_POINTER_P
check in mark_object, thus offloading GC from an in-depth examination of
them each time when they're found.
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Pure nil and t?
2014-09-22 8:38 Pure nil and t? Dmitry Antipov
@ 2014-09-22 8:51 ` David Kastrup
2014-09-22 9:16 ` Andreas Schwab
0 siblings, 1 reply; 3+ messages in thread
From: David Kastrup @ 2014-09-22 8:51 UTC (permalink / raw)
To: emacs-devel
Dmitry Antipov <dmantipov@yandex.ru> writes:
> For a long byte-compile runs, ~15-17% of objects seen by GC are nil and t
> (especially nil, which is ~10x more "popular" than t). What about making
> them pure? Thus way they will be quickly filtered out by PURE_POINTER_P
> check in mark_object, thus offloading GC from an in-depth examination of
> them each time when they're found.
In my Emacs I see
M-: (symbol-plist nil) RET
(event-symbol-element-mask (nil 0) event-symbol-elements (nil) modifier-cache ((0)))
M-: (symbol-plist t) RET
(event-symbol-element-mask (t 0) event-symbol-elements (t) modifier-cache ((0 . t)))
While I consider it likely that those are the result of glitches and/or
bugs, it would be nice if those glitches did not lead to crashes by
letting these plists get collected in spite of being accessible.
I have no idea whether this would be the case. It's just that I can
imagine it to be.
--
David Kastrup
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Pure nil and t?
2014-09-22 8:51 ` David Kastrup
@ 2014-09-22 9:16 ` Andreas Schwab
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Schwab @ 2014-09-22 9:16 UTC (permalink / raw)
To: David Kastrup; +Cc: emacs-devel
David Kastrup <dak@gnu.org> writes:
> Dmitry Antipov <dmantipov@yandex.ru> writes:
>
>> For a long byte-compile runs, ~15-17% of objects seen by GC are nil and t
>> (especially nil, which is ~10x more "popular" than t). What about making
>> them pure? Thus way they will be quickly filtered out by PURE_POINTER_P
>> check in mark_object, thus offloading GC from an in-depth examination of
>> them each time when they're found.
>
> In my Emacs I see
> M-: (symbol-plist nil) RET
> (event-symbol-element-mask (nil 0) event-symbol-elements (nil) modifier-cache ((0)))
> M-: (symbol-plist t) RET
> (event-symbol-element-mask (t 0) event-symbol-elements (t) modifier-cache ((0 . t)))
>
> While I consider it likely that those are the result of glitches and/or
> bugs, it would be nice if those glitches did not lead to crashes by
> letting these plists get collected in spite of being accessible.
They probably would have to be made pure as well, and checks would have
to be added to not try to modify any of the fields of a pure symbol.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-22 9:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-22 8:38 Pure nil and t? Dmitry Antipov
2014-09-22 8:51 ` David Kastrup
2014-09-22 9:16 ` Andreas Schwab
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.