You need to sign in or sign up before continuing.
Resolve "Speed improvement by compiling the `exec` function"
Compare changes
+ 3
− 1
@@ -44,7 +44,9 @@ class Rule:
Closes #4 (closed)
To run the function defined in the Rule
class, the exec
method is used. I tested this and it is 100x slower than using a regular function. This is because python needs to compile the same function every time. We can also compile the function at time of creating the Rule
, therefore making it as fast as regular python code.
\approve @ds