American Citizen on Thu, 03 Jul 2025 05:14:14 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: question on execution time for qfbsolve
|
- To: pari-users <pari-users@pari.math.u-bordeaux.fr>
- Subject: Re: question on execution time for qfbsolve
- From: American Citizen <website.reader3@gmail.com>
- Date: Wed, 2 Jul 2025 20:14:09 -0700
- Delivery-date: Thu, 03 Jul 2025 05:14:14 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751512451; x=1752117251; darn=pari.math.u-bordeaux.fr; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=JvgthoggV8Vv3DjHUwEwsyr26n/Ia0HU21f+A3gPulw=; b=JyBQtcrD+tDg749cJbF1LjRaCniTicud++Ge+nhVbAyQp64228nvlLJvOUg/6zqIEu cs2bhsToXukvhwaam8X516g6Q8us4gr0+WSM8pQkbu2FLVVb5Y73UBaghQO5/QaojUTi edK5dw3LWPsYFD5uofXWfVF30wj9QbGpK3go/VXNmP6qdJ1ijLgi7dvBWbXNWOIXcydz XS1PQINPdyozqoq9Xv0H+SmvMHAfgGdExfctq7jZ/8dGzcFPOYHDEh4n5AKatKrQvYNh L0Tmx12Lb4AMsGKxMQr2/iepdLPDuUnJzbnjZqBkOj0Mw5ZNULhSpiplpU4pwZV3LJr1 2iAw==
- In-reply-to: <fb1dccec-3050-40df-86f6-b3153ac7b5f7@gmail.com>
- References: <fb1dccec-3050-40df-86f6-b3153ac7b5f7@gmail.com>
- User-agent: Mozilla Thunderbird
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