take an early exit when gvprintdouble-ing a "0"
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 6 Oct 2020 01:14:31 +0000 (18:14 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 12 Oct 2020 02:58:06 +0000 (19:58 -0700)
commit894e94c66340187ff6f8ea97c9336ea048a3d6ad
treeed778d3580c9dab217445df2de7f7193de962d75
parent4136626cf8fa16069ddc2b9c5d3eb803996ed56d
take an early exit when gvprintdouble-ing a "0"

In large graphs, the value being printed is frequently zero and the snprintf in
this function shows up as a minor hotspot. Profiling with
tests/regression_tests/large/long_chain this drops the total snprintf calls
within gvprintdouble from 924019 to 858017. This lowers the contributing runtime
of gvprintdouble to overall execution from 28.89% to 28.12%.
lib/gvc/gvdevice.c