Skip to content

Commit

Permalink
Disable the parser cache
Browse files Browse the repository at this point in the history
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 with Python 3.6 and Ubuntu 18.04:

                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
  • Loading branch information
Kodiologist committed May 21, 2018
1 parent 3705635 commit 1732dde
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions hy/lex/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit 1732dde

Please sign in to comment.