Re: Fwd: Speed versus clarity
"Ruud H.G. van Tol" <[email protected]>
| Newsgroups | gmane.comp.mathematics.pari.devel |
|---|---|
| Message-ID | <[email protected]> |
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