Re: pgbench - refactor init functions with buffers - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: pgbench - refactor init functions with buffers
Date
Msg-id alpine.DEB.2.22.394.2010020946330.4138397@pseudo
Whole thread Raw
In response to Re: pgbench - refactor init functions with buffers  (Heikki Linnakangas <hlinnaka@iki.fi>)
List 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.



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Improve choose_custom_plan for initial partition prune case
Next
From: Justin Pryzby
Date:
Subject: Re: please update ps display for recovery checkpoint