[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



2011/4/14 Eric Blake <eblake 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]