param-parse: use g_string_append_c instead of g_string_append_printf
... to append a single character.
I did some tests to evaluate the performance impact of this patch, in
terms of number of instructions. I ran the following command line 20
times and computed the average and standard deviation of the number of
execution instructions.
$ libtool --mode=execute perf stat -e instructions:u ./src/cli/babeltrace2 query -p '
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=2,' src.ctf.fs yo
average stdev
Without this patch:
1079692 51
With this patch:
1039197 51
This represents a reduction of 3.75% in the number of executed
instructions.
Change-Id: I8109d42d0fa357e47642132a2f3b9581d72bcefa
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2403
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>