From de64b753946034895bca74bc198b6090cb2d5bcc Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 25 Apr 2015 06:15:15 -0700 Subject: Remove silly package lookup from keywordp. This tiny change yields a 165% (2.65X) speedup in the tst/tests/011/mandel.txr test case. * lib.c (keywordp): Use keyword_package_var instead of the keyword_package macro which looks up the global environment. * parser.y (sym_helper): Likewise. --- lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib.c') diff --git a/lib.c b/lib.c index d7503294..03316881 100644 --- a/lib.c +++ b/lib.c @@ -3639,7 +3639,7 @@ val symbolp(val sym) val keywordp(val sym) { - return (symbolp(sym) && symbol_package(sym) == keyword_package) ? t : nil; + return c_true(sym && symbolp(sym) && sym->s.package == keyword_package_var); } loc get_user_package(void) -- cgit v1.2.3