I would like to use eval()
for validation of short function synthesis. The search space may be fairly large, e.g. more than a million different functions. Functions will be synthesized as a string containing their source code and executed with eval()
.
Will Mojo have a performance advantage vs. Python for this task, or it just calls Python's eval()
through the compatibility layer? Is there a different method than string and eval()
, which would work for my scenario?
Just to add some context, so concerns about security of calling eval
are put to rest. What I'm doing is called Program Synthesis, see: https://en.wikipedia.org/wiki/Program_synthesis. I'm not calling eval
on an unknown source code.