From: Vibhav Pant <vibhavp@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: [Emacs-diffs] feature/byte-switch 13eabbd: bytecode.c (exec_byte_code): Use h->count instead of HASH_TABLE_SIZE
Date: Thu, 9 Feb 2017 21:57:25 +0530 [thread overview]
Message-ID: <CA+T2Sh3GG0W2cSYCLjqnZvL8Y-HA4Bogw_kdLY=yOSQDqurkQw@mail.gmail.com> (raw)
In-Reply-To: <jwvpoir1ndv.fsf-monnier+emacsdiffs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 522 bytes --]
On Thursday, February 9, 2017, Stefan Monnier <monnier@iro.umontreal.ca>
wrote:
> > +#ifdef BYTE_CODE_SAFE
> > + /* Hash tables for switch are declared with :size set to
> exact
> > + number of cases, so this should always be true. */
> > + eassert (HASH_TABLE_SIZE (h) == h->count);
> > +#endif
>
> This equality is not needed for safety, only for performance.
> IOW you can drop the assert altogether and turn it into a comment.
>
Done, thanks.
--
Vibhav Pant
vibhavp@gmail.com
[-- Attachment #2: Type: text/html, Size: 847 bytes --]
prev parent reply other threads:[~2017-02-09 16:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170209134357.2270.49861@vcs0.savannah.gnu.org>
[not found] ` <20170209134357.C161E25FF6@vcs0.savannah.gnu.org>
2017-02-09 13:58 ` [Emacs-diffs] feature/byte-switch 13eabbd: bytecode.c (exec_byte_code): Use h->count instead of HASH_TABLE_SIZE Stefan Monnier
2017-02-09 16:27 ` Vibhav Pant [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+T2Sh3GG0W2cSYCLjqnZvL8Y-HA4Bogw_kdLY=yOSQDqurkQw@mail.gmail.com' \
--to=vibhavp@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).