From 3f994112b5cab6ddd56303df9f0a36c1d6fd42b4 Mon Sep 17 00:00:00 2001 From: Kodi Arfer Date: Mon, 21 May 2018 09:14:04 -0700 Subject: [PATCH] Disable the parser cache I wasn't able to observe a meaningful performance improvement from it, and it requires some file I/O. Here are the times, in seconds, I observed on my ThinkPad T450s: test 1 test 2 master 8.96 2.59 this change 8.88 2.62 Test 1 is the total time from: $ time dash -c 'git clean -dfx && pip install -e . && pytest --ignore tests/test_bin.py' Test 2 is pytest's reported total time from a subsequent: $ pytest --ignore tests/test_bin.py --- hy/lex/parser.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hy/lex/parser.py b/hy/lex/parser.py index 236b8254f..fac2577f9 100755 --- a/hy/lex/parser.py +++ b/hy/lex/parser.py @@ -17,10 +17,7 @@ from .exceptions import LexException, PrematureEndOfInput -pg = ParserGenerator( - [rule.name for rule in lexer.rules] + ['$end'], - cache_id="hy_parser" -) +pg = ParserGenerator([rule.name for rule in lexer.rules] + ['$end']) mangle_delim = 'X'