summaryrefslogtreecommitdiff
path: root/shell-completion/zsh
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2017-10-11 23:14:07 -0700
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-10-12 08:14:07 +0200
commited0545201445ecf2476ba0dd2168afa9052eb9c5 (patch)
tree600660391354d3aa49745fb9054fc61c5ce2ce13 /shell-completion/zsh
parent709dbeac14447a06886bdf8d42016f0101bca5a8 (diff)
downloadsystemd-ed0545201445ecf2476ba0dd2168afa9052eb9c5.tar.gz
shared: add vectorized parse_field() (#7056)
By vectorizing parse_field() the chain of parse_field() calls in output_short() can be replaced with a single call receiving a description of the desired fields and their targets. While at it, eliminate the repeated strlen() calls performed on constant field names by making parse_field() receive the field length, and storing it in the ParseFieldVec at compile time. Also sort the output_short() fields so the short ones are tried first, for a minor efficiency gain. In addition to making the code less repetitive, gcc in my tests now inlines the parse_fieldv() call in output_short().
Diffstat (limited to 'shell-completion/zsh')
0 files changed, 0 insertions, 0 deletions