all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Philip Kaludercic <philipk@posteo.net>
Cc: 58338@debbugs.gnu.org
Subject: bug#58338: 29.0.50; mapatoms called on more elements than in obarray?
Date: Thu, 06 Oct 2022 21:00:58 +0300	[thread overview]
Message-ID: <83a668q1b9.fsf@gnu.org> (raw)
In-Reply-To: <87ilkxlygs.fsf@posteo.net> (message from Philip Kaludercic on Thu, 06 Oct 2022 16:16:03 +0000)

> From: Philip Kaludercic <philipk@posteo.net>
> Date: Thu, 06 Oct 2022 16:16:03 +0000
> 
> 
> >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.
> 
> Also interesting, if I intern a variable "foo", the value of i increases
> to 83106, while (length obarray) stays the same (?)

You assume that obarray is a flat vector or something?  Or how about
if you explain why the above surprised you?





  parent reply	other threads:[~2022-10-06 18:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-06 16:16 bug#58338: 29.0.50; mapatoms called on more elements than in obarray? Philip Kaludercic
2022-10-06 17:55 ` Gerd Möllmann
2022-10-06 18:21   ` Philip Kaludercic
2022-10-06 18:25     ` Gerd Möllmann
2022-10-06 18:28       ` Philip Kaludercic
2022-10-06 18:32         ` Gerd Möllmann
2022-10-06 18:51           ` Philip Kaludercic
2022-10-06 19:35             ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-07  4:52             ` Gerd Möllmann
2022-10-06 18:00 ` Eli Zaretskii [this message]
2022-10-06 18:04 ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a668q1b9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=58338@debbugs.gnu.org \
    --cc=philipk@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.