emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] feature/byte-switch 13eabbd: bytecode.c (exec_byte_cod


From: Vibhav Pant
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

On Thursday, February 9, 2017, Stefan Monnier <address@hidden> 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
address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]