py_ecc
py_ecc copied to clipboard
Cache subclasses of FQ
Cute Animal Picture

This change cuts the running time of EELS' stStaticCall - StaticcallToPrecompileFromCalledContract_d0g0v0_Berlin test from 248.37s (it hit a timeout, don't know how long it actually runs for) to 5.72s, an improvement of at least 43x under PyPy 7.3.19.
There are likely more elegant ways to solve this—creating a subclass dynamically is always going to be slow in PyPy—but this works for now.