git.postgresql.org Git - postgresql.git/commit
2022年2月27日 10:41:12 +0000 (10:41 +0000)
2022年2月27日 10:41:12 +0000 (10:41 +0000)
commit d996d648f333b04ae3da3c5853120f6f37601fb2
Simplify the inner loop of numeric division in div_var().
In the standard numeric division algorithm, the inner loop multiplies
the divisor by the next quotient digit and subtracts that from the
working dividend. As suggested by the original code comment, the
separate "carry" and "borrow" variables (from the multiplication and
subtraction steps respectively) can be folded together into a single
variable. Doing so significantly improves performance, as well as
simplifying the code.
Dean Rasheed, reviewed by Tom Lane.
Discussion: https://postgr.es/m/CAEZATCVwsBi-ND-t82Cuuh1=8ee6jdOpzsmGN+CUZB6yjLg9jw@mail.gmail.com
This is the main PostgreSQL git repository.
RSS
Atom