Re: pgbench - refactor init functions with buffers

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: David Steele <david(at)pgmasters(dot)net>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgbench - refactor init functions with buffers
Date: 2020-10-02 08:55:40
Message-ID: alpine.DEB.2.22.394.2010020946330.4138397@pseudo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> Can you elaborate what you meant by the new "print overheads should probably
> be avoided" comment?

Because printf is slow and this is on the critical path of data
generation. Printf has to interpret the format each time just to print
three ints, specialized functions could be used which would allow to skip
the repeated format parsing.

> I left that out since it seems unrelated to switching to PQExpBuffer.

Yep.

Thanks for the commit. Getting rid of most snprintf is a relief.

--
Fabien.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2020-10-02 09:13:54 Re: please update ps display for recovery checkpoint
Previous Message Amit Langote 2020-10-02 08:20:52 Re: Improve choose_custom_plan for initial partition prune case