Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

numutils.c

Blame
    • Tom Lane's avatar
      aa2387e2
      Improve speed of timestamp/time/date output functions. · aa2387e2
      Tom Lane authored
      It seems that sprintf(), at least in glibc's version, is unreasonably slow
      compared to hand-rolled code for printing integers.  Replacing most uses of
      sprintf() in the datetime.c output functions with special-purpose code
      turns out to give more than a 2X speedup in COPY of a table with a single
      timestamp column; which is pretty impressive considering all the other
      logic in that code path.
      
      David Rowley and Andres Freund, reviewed by Peter Geoghegan and myself
      aa2387e2
      History
      Improve speed of timestamp/time/date output functions.
      Tom Lane authored
      It seems that sprintf(), at least in glibc's version, is unreasonably slow
      compared to hand-rolled code for printing integers.  Replacing most uses of
      sprintf() in the datetime.c output functions with special-purpose code
      turns out to give more than a 2X speedup in COPY of a table with a single
      timestamp column; which is pretty impressive considering all the other
      logic in that code path.
      
      David Rowley and Andres Freund, reviewed by Peter Geoghegan and myself