Ruud H.G. van Tol on Tue, 03 Oct 2023 14:54:50 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
- To: pari-dev@pari.math.u-bordeaux.fr
- Subject: constant expressions
- From: "Ruud H.G. van Tol" <rvtol@isolution.nl>
- Date: Tue, 3 Oct 2023 14:54:43 +0200
- Delivery-date: Tue, 03 Oct 2023 14:54:50 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=isolution.nl; s=soverin; t=1696337685; bh=bytD3yDguwT+Hukzdv+57p7ON1Sh+bwJbHTpxnvYTzs=; h=Date:From:Subject:To:From; b=mdYkWnE23adWaqxbVAxNWBIgYUx1whD35qm4FEDeB2W3GtES8K89SpWVF8mEforHX 02LchtddE+dU/bH45i1NlApQdHAOUsoHf3szq7DQZ1veXY21A4DSHEWoYvECiQTcoF 8C6WWEp+HdNtdVVY1HkaQ8HZVODDIe3kn6pcENsHNBZKzWPQBiY+tgbE62uAVEwlgG 3Sn4CzIL6WItU6yb7+2l3RTPYwMc+85quhcjkU7H56BvQ6sNlhNCmk5OS1+faF1j3i kOfzQaqHaOYFAGsICjrGBbBG0jNT8l97/A2ODmDwA5funZH/je8ysxbAWuYC3wj9z/ /H8RpTICYwrAA==
Beware, "academic" examples only:
? for( i=1, 1e6, )
cpu time = 85 ms, real time = 87 ms.
? for( i=1, 1e6, 0 )
cpu time = 97 ms, real time = 98 ms.
? for( i=1, 1e6, 0+0+0+0+0+0+0 )
cpu time = 312 ms, real time = 313 ms.
? for( i=1, 1e6, 1 )
cpu time = 104 ms, real time = 105 ms.
? for( i=1, 1e6, 1/1/1/1/1/1/1 )
cpu time = 465 ms, real time = 419 ms.
Would it be feasible, and useful, and doable,
to make PARI/GP optimize constant expressions?
-- Ruud