On 07/25/2012 08:50 AM, Orit Wasserman wrote:
> For performance we are encoding long word at a time.
> For nzrun we use long-word-at-a-time NULL-detection tricks from strcmp():

[Technically, 'NUL' is the byte with value 0x00, 'NULL' is the pointer
with typical value 0x00000000 or 0x0000000000000000, depending on
whether you are 32-bit or 64-bit.  But it's not worth rewriting this
commit message just to delete an 'L']

> using ((lword - 0x0101010101010101) & (~lword) & 0x8080808080808080) test
> to find out if any byte in the long word is zero.
> 
> Signed-off-by: Benoit Hudzia <benoit.hud...@sap.com>
> Signed-off-by: Petter Svard <pett...@cs.umu.se>
> Signed-off-by: Aidan Shribman <aidan.shrib...@sap.com>
> Signed-off-by: Orit Wasserman <owass...@redhat.com>
> Signed-off-by: Eric Blake <ebl...@redhat.com>
> ---

> +int xbzrle_decode_buffer(uint8_t *src, int slen, uint8_t *dst, int dlen)

> +
> +        memcpy(dst + d , src + i, count);

I think coding style prefers no space before ','.  But if the patch
checker didn't warn...

-- 
Eric Blake   ebl...@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to