]> granicus.if.org Git - graphviz/commit
convert some gvprintf calls with no format codes to gvputs
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 21 May 2021 02:21:21 +0000 (19:21 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 27 May 2021 04:26:38 +0000 (21:26 -0700)
commit8a04d6fa0748d2752b9a43eac5bba297a8a0e7ff
tree8354827add6f555d5f0727433e31ce0033bea9f3
parent2df509f8edfc361dfb23d118c054270f49b03952
convert some gvprintf calls with no format codes to gvputs

This is equivalent, but gvputs is less expensive to call than gvprintf.
Surprisingly,¹ with link-time optimization a compiler is able to see this
optimization for itself, so this makes no difference to performance in an LTO
build. However, this should be a slight optimization in non-LTO builds.

¹ I say surprisingly because compilers generally do not attempt inter-procedural
  optimization across varargs calls. The calling convention and interpretation
  of arguments is complex enough that they generally conservatively leave such
  calls alone.
plugin/core/gvrender_core_svg.c