[libvirt] [PATCHv2 1/9] maint: use lighter-weight function for straight appends

Matthias Bolte matthias.bolte at googlemail.com
Fri Apr 15 20:05:51 UTC 2011


2011/4/14 Eric Blake <eblake at redhat.com>:
> It costs quite a few processor cycles to go through printf parsing
> just to determine that we only meant to append.

> -        virBufferVSprintf(&buf, "%s", k);
> -        virBufferVSprintf(&buf, "%s", "=");
> -        virBufferVSprintf(&buf, "%s", v);
> +        virBufferVSprintf(&buf, "%s=%s", k, v);

Nice one :)

ACK.

Matthias




More information about the libvir-list mailing list