Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shared.ecc.generate_with_order speed up #19

Closed
uvicorn opened this issue Jan 4, 2024 · 2 comments
Closed

shared.ecc.generate_with_order speed up #19

uvicorn opened this issue Jan 4, 2024 · 2 comments

Comments

@uvicorn
Copy link

uvicorn commented Jan 4, 2024

same problem: J08nY/ecgen#23
pari.qfbsolve(pari.Qfb(1, 0, -D), 4 * m, 1) is slow because pari try to factor m every time.
our solution:

m = Integer(sys.argv[1])
out = subprocess.check_output(['./yafu'], input=f'factor({m})'.encode())
for p in [int(a.split(b' = ')[1]) for a in out.splitlines() if b' = ' in a and a[0] == b'P'[0]]:
    if p > 1000:
        pari.addprimes(p)

seems we can replace yafu with default sage factor(m)

@jvdsn
Copy link
Owner

jvdsn commented Jan 6, 2024

Does a23ab9a address your concerns?

@uvicorn
Copy link
Author

uvicorn commented Jan 8, 2024

Yes, thanks! Btw for me almost always worked D=[16,64,256] and idk why

@uvicorn uvicorn closed this as completed Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants