[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#58338: 29.0.50; mapatoms called on more elements than in obarray?
From: |
Gerd Möllmann |
Subject: |
bug#58338: 29.0.50; mapatoms called on more elements than in obarray? |
Date: |
Thu, 06 Oct 2022 19:55:12 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) |
Philip Kaludercic <philipk@posteo.net> writes:
>>From reading the docstring of `mapatoms', I would assume that this would
> evaluate to t:
>
> (let ((i 0))
> (mapatoms (lambda (_) (setq i (1+ i))) obarray)
> (= (length obarray) i))
>
> But instead on my system I get (length obarray) ↝ 15121 and and i ↝
> 78050, which is are at a ratio of 5.16169565505.
obarray is a hash table. with each array element being a list of symbols
if not empty, for hash collisions. And it's not a hash table of the
kind that make-hash-table makes, which I added much later. And not a
Lisp list of symbols.
With your figures, it seems that there are on average 5 symbols per
bucket. For details you'd have to look at the C code.
- bug#58338: 29.0.50; mapatoms called on more elements than in obarray?, Philip Kaludercic, 2022/10/06
- bug#58338: 29.0.50; mapatoms called on more elements than in obarray?,
Gerd Möllmann <=
- bug#58338: 29.0.50; mapatoms called on more elements than in obarray?, Philip Kaludercic, 2022/10/06
- bug#58338: 29.0.50; mapatoms called on more elements than in obarray?, Gerd Möllmann, 2022/10/06
- bug#58338: 29.0.50; mapatoms called on more elements than in obarray?, Philip Kaludercic, 2022/10/06
- bug#58338: 29.0.50; mapatoms called on more elements than in obarray?, Gerd Möllmann, 2022/10/06
- bug#58338: 29.0.50; mapatoms called on more elements than in obarray?, Philip Kaludercic, 2022/10/06
- bug#58338: 29.0.50; mapatoms called on more elements than in obarray?, Basil L. Contovounesios, 2022/10/06
- bug#58338: 29.0.50; mapatoms called on more elements than in obarray?, Gerd Möllmann, 2022/10/07
bug#58338: 29.0.50; mapatoms called on more elements than in obarray?, Eli Zaretskii, 2022/10/06
bug#58338: 29.0.50; mapatoms called on more elements than in obarray?, Stefan Kangas, 2022/10/06