Skip to content

Commit

Permalink
Reduce cache usage
Browse files Browse the repository at this point in the history
  • Loading branch information
evhub committed May 26, 2024
1 parent e2ccf35 commit 9a38ac8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,14 @@ test-verbose: clean
python ./coconut/tests/dest/runner.py
python ./coconut/tests/dest/extras.py

# same as test-verbose but reuses the incremental cache
.PHONY: test-verbose-cache
test-verbose-cache: export COCONUT_USE_COLOR=TRUE
test-verbose-cache: clean-no-tests
python ./coconut/tests --strict --keep-lines --force --verbose
python ./coconut/tests/dest/runner.py
python ./coconut/tests/dest/extras.py

# same as test-verbose but doesn't use the incremental cache
.PHONY: test-verbose-no-cache
test-verbose-no-cache: export COCONUT_USE_COLOR=TRUE
Expand Down Expand Up @@ -359,7 +367,7 @@ check-reqs:
.PHONY: profile
profile: export COCONUT_USE_COLOR=TRUE
profile:
coconut ./coconut/tests/src/cocotest/agnostic/util.coco ./coconut/tests/dest/cocotest --force --jobs 0 --profile --verbose --stack-size 4096 --recursion-limit 4096 2>&1 | tee ./profile.log
coconut ./coconut/tests/src/cocotest/agnostic/util.coco ./coconut/tests/dest/cocotest --force --verbose --profile --stack-size 4096 --recursion-limit 4096 2>&1 | tee ./profile.log

.PHONY: open-speedscope
open-speedscope:
Expand Down
2 changes: 1 addition & 1 deletion coconut/_pyparsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,5 +543,5 @@ def start_profiling():

def print_profiling_results():
"""Print all profiling results."""
print_timing_info()
print_poorly_ordered_MatchFirsts()
print_timing_info()
3 changes: 2 additions & 1 deletion coconut/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def get_path_env_var(env_var, default):

use_cache_file = True

disable_incremental_for_len = 46080
# 0 for always disabled; float("inf") for always enabled
disable_incremental_for_len = 20480

adaptive_any_of_env_var = "COCONUT_ADAPTIVE_ANY_OF"
use_adaptive_any_of = get_bool_env_var(adaptive_any_of_env_var, True)
Expand Down

0 comments on commit 9a38ac8

Please sign in to comment.