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

Поиск
Список
Период
Сортировка
От Aaron Altman
Тема Re: Optimize numeric.c mul_var() using the Karatsuba algorithm
Дата
Msg-id 171832724172.156537.15821392522000571944.pgcf@coridan.postgresql.org
обсуждение исходный текст
Ответ на Re: Optimize numeric.c mul_var() using the Karatsuba algorithm  ("Joel Jacobson" <joel@compiler.org>)
Ответы Re: Optimize numeric.c mul_var() using the Karatsuba algorithm
Список pgsql-hackers
The following review has been posted through the commitfest application:
make installcheck-world:  not tested
Implements feature:       not tested
Spec compliant:           not tested
Documentation:            not tested

This applies cleanly to master, builds and passes regression tests in my Windows/Cygwin environment.  

I also read through comments and confirmed for myself that the assumption about the caller ensuring var1 is shorter is
donealready in unchanged code from mul_var.  Frees correspond to inits.  The "Karatsuba condition" reasoning for
decidingwhether a number is big enough to use this algorithm appears to match what Joel has stated in this thread.
 

The arithmetic appears to match what's been described in the comments.  I have *not* confirmed that with any detailed
reviewof the Karatsuba algorithm from outside sources, other implementations like the Rust one referenced here, or
anythingsimilar.  I'm hoping that the regression tests give sufficient coverage that if the arithmetic was incorrect
therewould be obvious failures.  If additional coverage was needed, cases falling immediately on either side of the
limitingconditions used in the patch would probably be useful.  From the limited precedent I've exposed myself to, that
doesn'tseem to be required here, but I'm open to contrary input from other reviewers.  In the meantime, I'm marking
thisapproved.  
 

Thanks for the detailed background and comments, Joel!

The new status of this patch is: Ready for Committer

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: race condition in pg_class
Следующее
От: Chapman Flack
Дата:
Сообщение: Re: jsonpath: Missing Binary Execution Path?