Re: Optimize numeric.c mul_var() using the Karatsuba algorithm

From: Aaron Altman <aaronaltman(at)posteo(dot)net>
To: Joel Jacobson <joel(at)compiler(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Optimize numeric.c mul_var() using the Karatsuba algorithm
Date: 2024-06-11 17:16:38
Message-ID: f2f123a6-4b63-4932-9ccb-1474625e6285@posteo.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Joel, thanks for posting this.  Although I have only a cursory
familiarity with fast multiplication algorithms, I'd like to try and
give it a review.  To start with, can you help me understand the choice
of this algorithm versus others like Toom?  If this looks correct on a
closer view I'll propose it for inclusion. Along the way though I'd like
to have it explicitly called out whether this is superior in general to
other choices, better for more realistic use cases, simpler, clearer to
license or something similar.  It would be nice for future dicussions to
have some context around whether it would make sense to have conditions
to choose other algorithms as well, or if this one is generally the best
for what Postgres users are usually doing.

Continuing with code review in any case.  Interested to hear more.

Regards,

Aaron Altman

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2024-06-11 17:26:20 Re: Track the amount of time waiting due to cost_delay
Previous Message Robert Haas 2024-06-11 17:13:48 Re: Track the amount of time waiting due to cost_delay