]> granicus.if.org Git - procps-ng/commit
library: improve performance for one 'escape' function
authorJim Warner <james.warner@comcast.net>
Tue, 12 Jan 2021 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@dropbear.xyz>
Thu, 21 Jan 2021 06:30:24 +0000 (17:30 +1100)
commit031a08f2a76fcc4898b6c1619335512f3030d68a
tree89e56d110251c4d5fe8202da9a5ccdbe7e783e50
parent0cf6942be70817cc363c4ae4df99d56d3e317b71
library: improve performance for one 'escape' function

While this patch has some cosmetic whitespace changes,
more importantly it makes that 'esc_all' function more
efficient. By abandoning the indexed loop approach for
a direct pointer manipulation, we will save 9 iterated
machine instructions, for a total of 33 bytes of code.

Signed-off-by: Jim Warner <james.warner@comcast.net>
proc/escape.c