Ruud H.G. van Tol on Wed, 29 Mar 2023 13:27:05 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Fwd: Speed versus clarity
|
- To: pari-dev@pari.math.u-bordeaux.fr
- Subject: Re: Fwd: Speed versus clarity
- From: "Ruud H.G. van Tol" <rvtol@isolution.nl>
- Date: Wed, 29 Mar 2023 13:25:47 +0200
- Delivery-date: Wed, 29 Mar 2023 13:27:05 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=isolution.nl; s=soverin; t=1680089149; bh=uAyNf+RqA+MUVS+Dp50ROzA2zmFSyLgglzTflZO7Qys=; h=Date:From:Subject:To:References:In-Reply-To:From; b=VrGwMd/beva6DLoCcTq2ZLPowLi2NKUBafwWMeeabFv5y0p6ZPp/6wDpnGJHxJwuH dGTk5gPLe3TrcxiYLX8tpJrgdyIBDJh7Yl2Q94hIugRbJFNhUYOQ0Q2P9JYhL5wtxO R5EFrX6W2f/u3eF/4ut/wRFB7FNydX5LIUUy3lwVw2c6XTkR7PpJDLrhTGi/tvLxRY PRrWFp1TfNd7nsJ6sJ2sTHFPBghLR21wKbtsAkFjkvoleYMEnaYmUp9Aiwr7Q7zbVb ttSCe+DDGehhbmrnOjkSQUeIJ2f10mzJE2TvR7cDpCkPmr1bnGZGq1u9K+CFtmdIuW DosIToub47m/w==
- In-reply-to: <ZCQNLg6u4I4G5V9Q@seventeen>
- References: <3cf114d6-5b22-702f-1d5f-54cf04635123@jamasaru.com> <f2413e51-2669-4a2f-122c-2bcee258fae3@jamasaru.com> <ZCQNLg6u4I4G5V9Q@seventeen>
On 2023-03-29 12:04, Bill Allombert wrote:
For example for issquare(N), in some application, N wil almost always
be a square,
while in other N will almost never be a square. Ideally one should not use the
same algorithm for both case.
Then maybe issquare wants to grow a hint-flag (as an extra parameter),
to give the caller a way to influence that decision.
Another option is to have 2 names:
issquare_while_unlikely
issquare_while_likely
but then what to do if
issquare_while_unlikely(t_COMPLEX)
gets called ...
:)
-- Ruud