[Top][All Lists]

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

Re: [Emacs-diffs] feature/byte-switch a75d080: * src/bytecode.c: Refacto

From: Stefan Monnier
Subject: Re: [Emacs-diffs] feature/byte-switch a75d080: * src/bytecode.c: Refactor to follow GNU coding standards
Date: Sat, 11 Feb 2017 10:46:48 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> +                    if (BYTE_CODE_SAFE)
> +                      eassert (!NILP (HASH_HASH (h, i)));

Declaring that non-full hashtables are "dangerous" is rather annoying.
In this case, I think we can do better:

                 Lisp_Object hash_code
                   = make_number (h->test.hashfn (&h->test, v1));

this then lets us use EQ (hash_code, ...) instead of hash_code == XUINT
(...)  which not only correctly skips nil hashes but might even be ever
so slightly faster (both use == on the same size of integers, but the
former avoids the cost of XUINT).


reply via email to

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