Open 1e9abhi1e10 opened 1 year ago
It would be good to have a polynomial benchmarks file if there is not already somewhere that has polynomial benchmarks.
Also, should I add all benchmarks which were I commented on the
Yes, and there should be many different benchmarks for them like comparing different methods for the same operation e.g. the prem
function vs the Poly.prem
method vs the PolyElement.prem
method etc:
In [1]: f, g = x**2*y + x*z + 1, x*z + y
In [2]: %time prem(f, g, x)
CPU times: user 13.2 ms, sys: 196 µs, total: 13.4 ms
Wall time: 12.3 ms
Out[2]:
3 2 2
y - y⋅z + z
In [3]: fp, gp = Poly(f, [x, y, z]), Poly(g, [x, y, z])
In [4]: %time fp.prem(gp)
CPU times: user 3.71 ms, sys: 0 ns, total: 3.71 ms
Wall time: 3.39 ms
Out[4]: Poly(y**3 - y*z**2 + z**2, x, y, z, domain='ZZ')
In [5]: R = ZZ[x,y,z]
In [6]: fpe, gpe = R.from_sympy(f), R.from_sympy(g)
In [7]: %time fpe.prem(gpe)
CPU times: user 1.86 ms, sys: 0 ns, total: 1.86 ms
Wall time: 1.88 ms
Out[7]: y**3 - y*z**2 + z**2
Moving ahead should we also add benchmarks for the pdiv
, pquo
and pexquo
?
Moving ahead should we also add benchmarks for the
pdiv
,pquo
andpexquo
?
Yes.
Moving ahead should we also add benchmarks for the
pdiv
,pquo
andpexquo
?Yes.
Actually thinking about this we don't need benchmarks for pquo
, pexquo
and pdiv
because they all use the same code (and that is unlikely to change in future). Just one of these is fine.
@oscarbenjamin I want to know whether I create a new file or add a benchmark in the
benchmarks/polys.py
file. Also, should I add all benchmarks which were I commented on the Issue.