From b1dc618ec7f2541c0ea8a2e5c6ce4b3b06cadbe2 Mon Sep 17 00:00:00 2001 From: Nikhil Date: Thu, 4 Jul 2019 20:39:52 +0530 Subject: [PATCH] Use a power of 2 for LRU cache size --- mythril/analysis/solver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mythril/analysis/solver.py b/mythril/analysis/solver.py index 42abb4e1..ae1faf2c 100644 --- a/mythril/analysis/solver.py +++ b/mythril/analysis/solver.py @@ -17,8 +17,8 @@ import logging log = logging.getLogger(__name__) - -@lru_cache(maxsize=10000000) +# LRU cache works great when used in powers of 2 +@lru_cache(maxsize=2 ** 23) def get_model(constraints, minimize=(), maximize=(), enforce_execution_time=True): """