You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
takes about 2 seconds on a 2.6ghz mac i7, and then doing maths on x is practically instant.
However:
print(x)
then takes over a minute...
I think that the numerical operations are all actually really fast. It still makes sense to have limits in place for them - but much higher limits, probably.
However, converting them to strings (even just printing the number to stdout means converting to string first) is ... a lot slower.
With that in mind - how could we revisit the safety limits in simpleeval?
an option:
One thing that may help would be looking at gmpy2 as an option for maths in general - but turning numbers into strings in particular. Weirdly:
fromgmpy2importmpzprint(str(mpz(x)))
is almost instant too...
Even if we don't want to include gmpy2 as a dependency of simpleeval (certainly not happening before the 2.x branching...) then at least having some kind of mentioning & examples in the docs could be really useful.
The text was updated successfully, but these errors were encountered:
takes about 2 seconds on a 2.6ghz mac i7, and then doing maths on
x
is practically instant.However:
then takes over a minute...
I think that the numerical operations are all actually really fast. It still makes sense to have limits in place for them - but much higher limits, probably.
However, converting them to strings (even just printing the number to stdout means converting to string first) is ... a lot slower.
With that in mind - how could we revisit the safety limits in simpleeval?
an option:
One thing that may help would be looking at gmpy2 as an option for maths in general - but turning numbers into strings in particular. Weirdly:
is almost instant too...
Even if we don't want to include gmpy2 as a dependency of simpleeval (certainly not happening before the 2.x branching...) then at least having some kind of mentioning & examples in the docs could be really useful.
The text was updated successfully, but these errors were encountered: