Skip to content

Commit

Permalink
cache evaluable.compile
Browse files Browse the repository at this point in the history
  • Loading branch information
joostvanzwieten committed May 7, 2024
1 parent 2054953 commit 32c267f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nutils/evaluable.py
Original file line number Diff line number Diff line change
Expand Up @@ -5106,6 +5106,7 @@ def eval_sparse(funcs: AsEvaluableArray, **arguments: typing.Mapping[str, numpy.
yield data


@functools.lru_cache(256)
def compile(func, *, simplify: bool = True, stats: typing.Optional[bool] = None, cache_const_intermediates: bool = True):
# Compiles `Evaluable`s to Python code. Every `Loop` is assigned a unique
# loop id with `_define_loop_block_structure` and based on these loop ids
Expand Down

0 comments on commit 32c267f

Please sign in to comment.