aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/funcs.c
diff options
context:
space:
mode:
authorDean Rasheed <dean.a.rasheed@gmail.com>2024-08-15 10:33:12 +0100
committerDean Rasheed <dean.a.rasheed@gmail.com>2024-08-15 10:33:12 +0100
commitc4e44224cf617c8cd33a734f888c045ac9575226 (patch)
treee5fc932beeff889b970eddff5ea6a928522cfe08 /src/tutorial/funcs.c
parentfce7cb6da09b56462fc734e789348376848caf4c (diff)
downloadpostgresql-c4e44224cf617c8cd33a734f888c045ac9575226.tar.gz
postgresql-c4e44224cf617c8cd33a734f888c045ac9575226.zip
Extend mul_var_short() to 5 and 6-digit inputs.
Commit ca481d3c9a introduced mul_var_short(), which is used by mul_var() whenever the shorter input has 1-4 NBASE digits and the exact product is requested. As speculated on in that commit, it can be extended to work for more digits in the shorter input. This commit extends it up to 6 NBASE digits (up to 24 decimal digits), for which it also gives a significant speedup. This covers more cases likely to occur in real-world queries, for which using base-NBASE^2 arithmetic provides little benefit. To avoid code bloat and duplication, refactor it a bit using macros and exploiting the fact that some portions of the code are shared between the different cases. Dean Rasheed, reviewed by Joel Jacobson. Discussion: https://postgr.es/m/9d8a4a42-c354-41f3-bbf3-199e1957db97%40app.fastmail.com
Diffstat (limited to 'src/tutorial/funcs.c')
0 files changed, 0 insertions, 0 deletions