aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bytecode.c')
-rw-r--r--src/bytecode.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/bytecode.c b/src/bytecode.c
index d668a9a6a15..9aad1eb642b 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -1406,18 +1406,12 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
1406 1406
1407 /* h->count is a faster approximation for HASH_TABLE_SIZE (h) 1407 /* h->count is a faster approximation for HASH_TABLE_SIZE (h)
1408 here. */ 1408 here. */
1409 if (h->count <= 5) 1409 if (h->count <= 5 && !h->test.cmpfn)
1410 { /* Do a linear search if there are not many cases 1410 { /* Do a linear search if there are not many cases
1411 FIXME: 5 is arbitrarily chosen. */ 1411 FIXME: 5 is arbitrarily chosen. */
1412 Lisp_Object hash_code 1412 for (i = h->count; 0 <= --i; )
1413 = h->test.cmpfn ? h->test.hashfn (v1, h) : Qnil; 1413 if (EQ (v1, HASH_KEY (h, i)))
1414 1414 break;
1415 for (i = h->count; 0 <= --i; )
1416 if (EQ (v1, HASH_KEY (h, i))
1417 || (h->test.cmpfn
1418 && EQ (hash_code, HASH_HASH (h, i))
1419 && !NILP (h->test.cmpfn (v1, HASH_KEY (h, i), h))))
1420 break;
1421 } 1415 }
1422 else 1416 else
1423 i = hash_lookup (h, v1, NULL); 1417 i = hash_lookup (h, v1, NULL);