]> granicus.if.org Git - graphviz/commit
compute the extent of some gvputs writes at compile time
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 21 May 2021 03:50:11 +0000 (20:50 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 27 May 2021 04:26:38 +0000 (21:26 -0700)
commit1764f50bcbdf944e003fe475aba2c26e2fd370ff
tree7a1422c8787ec2a8152508415da3d0b94fb2d07e
parent73c2f1e29ace1daf3c35360ade10af404923a3cb
compute the extent of some gvputs writes at compile time

This change teaches the compiler how to unfold gvputs of a string literal into
gvwrite, computing the length of the literal at compile time. This is only
applied to the SVG back end in this commit.

On tests/regression_tests/large/long_chain, this drops the number of gvputs
calls from 2442066 to 363011, though obviously introduces the difference as
gvwrite calls. The total executed instructions drops from 8093310656 to
8009099650, a speed up of ~1%.
plugin/core/gvrender_core_svg.c