Re: Missing free_var() at end of accum_sum_final()?
От | Joel Jacobson |
---|---|
Тема | Re: Missing free_var() at end of accum_sum_final()? |
Дата | |
Msg-id | 98d3ff28-3284-4ca7-9c4a-32ab84ab57f8@app.fastmail.com обсуждение исходный текст |
Ответ на | Re: Missing free_var() at end of accum_sum_final()? ("Joel Jacobson" <joel@compiler.org>) |
Ответы |
Re: Missing free_var() at end of accum_sum_final()?
|
Список | pgsql-hackers |
On Sun, Feb 19, 2023, at 23:16, Joel Jacobson wrote: > Hi again, > > Ignore previous patch, new correct version attached, that also keeps > track of if the buf-field is in use or not. Ops! One more thinko, detected when trying fixed_buf[8], which caused a seg fault. To fix, a init_var() in alloc_var() is needed when we will use the fixed_buf instead of allocating, since alloc_var() could be called in a loop for existing values, like in sqrt_var() for instance. Attached new version produces similar benchmark results, even with the extra init_var(): HEAD: format | pretty_time | count -----------------------+-------------+------- numeric_in(1234,0,-1) | 31 ns | 74 numeric_in(1234,0,-1) | 32 ns | 26 (2 rows) 0003-fixed-buf.patch: format | pretty_time | count -----------------------+-------------+------- numeric_in(1234,0,-1) | 24 ns | 1 numeric_in(1234,0,-1) | 25 ns | 84 numeric_in(1234,0,-1) | 26 ns | 15 (3 rows) /Joel
Вложения
В списке pgsql-hackers по дате отправления: