On Tue, 2021-11-09 at 10:54 -0800, Alex J Best wrote:
> I agree the situation with zn_poly is a mess, but I think it would be good
> to do some actual benchmarks to check if the NTL code is faster or
> comparable to the zn_poly version, I don't see any data in the ticket but
> you do say "The one thing it does is done better by NTL" so maybe you
> already did some?
It would be hard to benchmark without knowing where zn_poly fails. The
only function in sagelib that uses zn_poly is in hypellfrob.cpp, and it
has a comment at the top:
Note that the zn_poly version occasionally fails; this happens more
frequently for smaller p, but is extremely rare for larger p. This
wrapper detects this and falls back on the zz_p/ZZ_p versions, which
should never fail.
That's what I meant by "NTL does it better," and any benchmark would
have to take into consideration the attempts that failed and were
actually made with NTL instead. Certainly those cases are slower than
if we'd just used NTL the first time.