From 32c267f1efd1323f4f551c551be78ca47f6a1f87 Mon Sep 17 00:00:00 2001 From: Joost van Zwieten Date: Tue, 7 May 2024 11:37:07 +0200 Subject: [PATCH] cache evaluable.compile --- nutils/evaluable.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nutils/evaluable.py b/nutils/evaluable.py index d02df4bed..bec60cb1c 100644 --- a/nutils/evaluable.py +++ b/nutils/evaluable.py @@ -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