Re: Avoid overhead with fprintf related functions

2022-09-09 Thread Nathan Bossart
On Fri, Sep 09, 2022 at 05:53:54PM -0400, Tom Lane wrote: > Ranier Vilela writes: >> Em sex., 9 de set. de 2022 às 13:20, Nathan Bossart < >> nathandboss...@gmail.com> escreveu: >>> I agree with David [0]. But if you can demonstrate a performance gain, >>> perhaps it's worth considering a subset

Re: Avoid overhead with fprintf related functions

2022-09-09 Thread Ranier Vilela
Em sex., 9 de set. de 2022 às 18:53, Tom Lane escreveu: > Ranier Vilela writes: > > Em sex., 9 de set. de 2022 às 13:20, Nathan Bossart < > > nathandboss...@gmail.com> escreveu: > >> I agree with David [0]. But if you can demonstrate a performance gain, > >> perhaps it's worth considering a sub

Re: Avoid overhead with fprintf related functions

2022-09-09 Thread Tom Lane
Ranier Vilela writes: > Em sex., 9 de set. de 2022 às 13:20, Nathan Bossart < > nathandboss...@gmail.com> escreveu: >> I agree with David [0]. But if you can demonstrate a performance gain, >> perhaps it's worth considering a subset of these changes in hot paths. > head: > Time: 418,210 ms > Tim

Re: Avoid overhead with fprintf related functions

2022-09-09 Thread Ranier Vilela
Em sex., 9 de set. de 2022 às 10:45, Ranier Vilela escreveu: > Based on work in [1]. > According to https://cplusplus.com/reference/cstdio/fprintf/ > The use of fprintf is related to the need to generate a string based on a > format, which should be different from "%s". > Since fprintf has overhe

Re: Avoid overhead with fprintf related functions

2022-09-09 Thread Ranier Vilela
Em sex., 9 de set. de 2022 às 13:20, Nathan Bossart < nathandboss...@gmail.com> escreveu: > On Fri, Sep 09, 2022 at 10:45:37AM -0300, Ranier Vilela wrote: > > Based on work in [1]. > > According to https://cplusplus.com/reference/cstdio/fprintf/ > > The use of fprintf is related to the need to gen

Re: Avoid overhead with fprintf related functions

2022-09-09 Thread Nathan Bossart
On Fri, Sep 09, 2022 at 10:45:37AM -0300, Ranier Vilela wrote: > Based on work in [1]. > According to https://cplusplus.com/reference/cstdio/fprintf/ > The use of fprintf is related to the need to generate a string based on a > format, which should be different from "%s". > Since fprintf has overhe

Avoid overhead with fprintf related functions

2022-09-09 Thread Ranier Vilela
Based on work in [1]. According to https://cplusplus.com/reference/cstdio/fprintf/ The use of fprintf is related to the need to generate a string based on a format, which should be different from "%s". Since fprintf has overhead when parsing the "format" parameter, plus all the trouble of checking