Re: Greatest Common Divisor
Tom Lane <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.devel.general |
|---|---|
| Message-ID | <[email protected]> |
Dean Rasheed <[email protected]> writes: > OTOH, for numeric inputs, this could easily end up needing many > thousands of divisions and it's not hard to construct inputs that take > minutes to compute, although this is admittedly with ridiculously > large inputs (~10^130000), and AFAICS, the performance is OK with > "normal" sized inputs. Should we put a limit on the size of the > inputs? No, but a CHECK_FOR_INTERRUPTS in the loop would be well-advised, if there's not one already inside the called functions. > There are apparently more efficient algorithms, but I think that > should definitely be kept out of scope for this patch. +1 regards, tom lane