Faster version of (eq?)

This commit is contained in:
Justin Ethier 2018-06-08 18:08:04 -04:00
parent 6bec04f9c4
commit b4f4c9a182
2 changed files with 9 additions and 8 deletions

View file

@ -435,7 +435,8 @@ double MRG32k3a (double seed);
* \defgroup prim_eq Equality and type predicates
*/
/**@{*/
object Cyc_eq(object x, object y);
//object Cyc_eq(object x, object y);
#define Cyc_eq(x, y) (make_boolean(x == y))
int equal(object, object);
object equalp(object, object);
object Cyc_has_cycle(object lst);

View file

@ -1720,13 +1720,13 @@ object Cyc_is_procedure(void *data, object o)
// return boolean_t;
// return boolean_f;
//}
object Cyc_eq(object x, object y)
{
if (x == y)
return boolean_t;
return boolean_f;
}
//
//object Cyc_eq(object x, object y)
//{
// if (x == y)
// return boolean_t;
// return boolean_f;
//}
object Cyc_set_cell(void *data, object l, object val)
{