Micro-optimization: speed up equal() a bit

Just see if x and y are the same before type checking; this shaves off a bit of time in the benchmark (IE, under heavy loads).
This commit is contained in:
Justin Ethier 2019-10-03 16:22:01 -04:00
parent 17daa82bb9
commit 7786181722

View file

@ -632,6 +632,8 @@ void Cyc_rt_raise_msg(void *data, const char *err)
int equal(object x, object y)
{
if (x == y)
return 1;
if (x == NULL)
return (y == NULL);
if (y == NULL)