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: Stefan Monnier
Subject: Re: [Emacs-diffs] feature/byte-switch 13eabbd: bytecode.c (exec_byte_code): Use h->count instead of HASH_TABLE_SIZE
Date: Thu, 09 Feb 2017 08:58:40 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> +#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.


        Stefan



reply via email to

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