Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas2016-09-02 08:51:49 +0000
committerHeikki Linnakangas2016-09-02 08:51:49 +0000
commit9cca11c915e458323d0e746c68203f2c11da0302 (patch)
treeeb45155d06c2bd9794a345ce15933fbfc69a75d4 /src/backend/regex/regexec.c
parent9f85784cae4d057f307b83b0d33edede33434f04 (diff)
Speed up SUM calculation in numeric aggregates.
This introduces a numeric sum accumulator, which performs better than repeatedly calling add_var(). The performance comes from using wider digits and delaying carry propagation, tallying positive and negative values separately, and avoiding a round of palloc/pfree on every value. This speeds up SUM(), as well as other standard aggregates like AVG() and STDDEV() that also calculate a sum internally. Reviewed-by: Andrey Borodin Discussion: <c0545351-a467-5b76-6d46-4840d1ea8aa4@iki.fi>
Diffstat (limited to 'src/backend/regex/regexec.c')
0 files changed, 0 insertions, 0 deletions