Re: Missing free_var() at end of accum_sum_final()?

Поиск
Список
Период
Сортировка
От Joel Jacobson
Тема Re: Missing free_var() at end of accum_sum_final()?
Дата
Msg-id 1c7ed4af-be18-4598-b253-ea071c91d9ef@app.fastmail.com
обсуждение исходный текст
Ответ на Re: Missing free_var() at end of accum_sum_final()?  (Andres Freund <andres@anarazel.de>)
Ответы Re: Missing free_var() at end of accum_sum_final()?  ("Joel Jacobson" <joel@compiler.org>)
Список pgsql-hackers
On Fri, Feb 17, 2023, at 21:26, Andres Freund wrote:
> Removing the free_var()s from numeric_add_opt_error() speeds it up from ~361ms
> to ~338ms.

I notice numeric_add_opt_error() is extern and declared in numeric.h,
called from e.g. timestamp.c and jsonpath_exec.c. Is that a problem,
i.e. is there a risk it could be used in a for loop by some code outside Numeric?

> This code really needs some memory management overhead reduction love. Many
> allocation could be avoided by having a small on-stack "buffer" that's used
> unless the numeric is large.

Nice idea!
Could something like the attached patch work?

/Joel
Вложения

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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: Add LZ4 compression in pg_dump
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Handle TEMP_CONFIG for pg_regress style tests in pg_regress.c