- Add vector benchmarks - Optimize vector append - Refine vector fields names - Clean up vector usage in crypto module I'm fine with relicensing these changes for for nbdkit. Changes in v2: - Benchmarks do not run by default (Richard) - Add "make bench" target to run the benchmarks v1: https://listman.redhat.com/archives/libguestfs/2021-October/msg00286.html Nir Soffer (8): common/utils: Add vector benchmarks common/utils: Do not run benchmarks by default common/utils/vector.c: Optimize vector append common/utils/vector: Rename `alloc` to `cap` common/utils/vector: Rename `size` to `len` lib/crypto.c: Simplify vector reserve lib/crypto.c: Don't use empty vector lib/crypto.c: Remove unneeded else Makefile.am | 5 ++ README | 4 ++ common/utils/Makefile.am | 5 +- common/utils/bench.h | 72 ++++++++++++++++++++ common/utils/test-vector.c | 58 +++++++++++++++- common/utils/vector.c | 14 +++- common/utils/vector.h | 40 +++++------ copy/file-ops.c | 14 ++-- copy/main.c | 2 +- copy/multi-thread-copying.c | 2 +- copy/nbd-ops.c | 20 +++--- copy/synch-copying.c | 2 +- fuse/nbdfuse.c | 4 +- fuse/operations.c | 16 ++--- generator/states-connect-socket-activation.c | 2 +- generator/states-newstyle-opt-meta-context.c | 8 +-- info/list.c | 8 +-- info/map.c | 12 ++-- info/show.c | 6 +- lib/crypto.c | 18 ++--- lib/handle.c | 4 +- lib/uri.c | 8 +-- 22 files changed, 236 insertions(+), 88 deletions(-) create mode 100644 common/utils/bench.h -- 2.31.1