postgresql/src/backend/utils
Dean Rasheed c4e44224cf 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
2024-08-15 10:33:12 +01:00
..
activity Fix a series of typos and outdated references 2024-08-12 23:27:09 +12:00
adt Extend mul_var_short() to 5 and 6-digit inputs. 2024-08-15 10:33:12 +01:00
cache Optimize InvalidateAttoptCacheCallback() and TypeCacheTypCallback() 2024-08-07 07:06:17 +03:00
error Move all extern declarations for GUC variables to header files 2024-07-24 06:31:07 +02:00
fmgr Revise GUC names quoting in messages again 2024-05-17 11:44:26 +02:00
hash Add user-callable CRC functions. 2024-08-12 10:35:06 -05:00
init Use pgBufferUsage for buffer usage tracking in analyze. 2024-08-13 18:49:45 -07:00
mb Remove dead generators for cyrillic encoding conversion tables 2024-07-29 20:38:19 +03:00
misc Remove TRACE_SORT macro 2024-08-14 08:07:52 +02:00
mmgr Fix incorrect sentinel byte logic in GenerationRealloc() 2024-07-06 13:59:34 +12:00
resowner Remove unused typedefs 2024-05-17 07:36:12 +02:00
sort Remove TRACE_SORT macro 2024-08-14 08:07:52 +02:00
time Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
.gitignore Rearrange makefile rules for running Gen_fmgrtab.pl. 2018-05-03 17:54:18 -04:00
errcodes.txt Add new error code for "file name too long" 2024-07-22 09:28:01 +09:00
Gen_dummy_probes.pl Update copyright for 2024 2024-01-03 20:49:05 -05:00
Gen_fmgrtab.pl Update copyright for 2024 2024-01-03 20:49:05 -05:00
generate-errcodes.pl Update copyright for 2024 2024-01-03 20:49:05 -05:00
Makefile Update copyright for 2024 2024-01-03 20:49:05 -05:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
postprocess_dtrace.sed Update copyright for 2024 2024-01-03 20:49:05 -05:00
probes.d Update copyright for 2024 2024-01-03 20:49:05 -05:00