Re: question on execution time for qfbsolve

American Citizen <[email protected]>
Newsgroups gmane.comp.mathematics.pari.user
Message-ID <[email protected]>
I ran over the first 100,000 integers

? for(i=1,100000,qfbsolve(Qfb(1,0,1),i,3))
cpu time = 3,394 ms, real time = 3,394 ms.
? for(i=1,100000,qfbsolve(Qfb(1,0,1),[i,factor(i)],3))
cpu time = 3,348 ms, real time = 3,348 ms.

so it is about the same, not much improvement, 46 milliseconds.

On 7/2/25 20:11, American Citizen wrote:
> Hello:
>
> Currently I am using qfbsolve(Qfb(1,0,1),N,3) to find pairs of squares 
> summing to N (if possible)
>
> The web page 
> https://pari.math.u-bordeaux.fr/dochtml/html/Arithmetic_functions.html#qfbsolve 
> states that "The integer n can also be given by its factorization 
> matrix fa = factor(n) or by the pair [n, fa]."
>
> Currently my values for N < 1,000,000 and in fact are only primes or 
> composites of primes of 1 mod 4 only.
>
> How much of a speed up would I obtain by doing 
> qfbsolve(Qfb(1,0,1),[N,factor(N)],3)  instead?
>
> Randall
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.