Re: [PATCH] [48/48] Suspend2 2.1.9.8 for 2.6.12: 624-filewriter.patch

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

 



Hi!

> +/*
> + * sacrifice some compression quality in favour of compression speed.
> + * (roughly 1-2% worse compression for large blocks and
> + * 9-10% for small, redundant, blocks and >>20% better speed in both cases)
> + * In short: enable this for binary data, disable this for text data.
> + */
> +#define ULTRA_FAST 1
> +
> +#define STRICT_ALIGN 0
> +#define USE_MEMCPY 1
> +#define INIT_HTAB 0

Ugly, ugly, ugly. Pick one set of options and use them.

> +/*
> + * don't play with this unless you benchmark!
> + * decompression is not dependent on the hash function
> + * the hashing function might seem strange, just believe me
> + * it works ;)
> + */
> +#define FRST(p) (((p[0]) << 8) + p[1])
> +#define NEXT(v,p) (((v) << 8) + p[2])

Dnt wrt mcr nms lk ths!

> +	if (ctx->first_call) {
> +		ctx->first_call = 0;
> +	}
> +#if INIT_HTAB
> +# if USE_MEMCPY
> +    memset (htab, 0, sizeof (htab));
> +# else
> +    for (hslot = htab; hslot < htab + HSIZE; hslot++)
> +      *hslot++ = ip;
> +# endif
> +#endif


Eh? Use_memcpy and then it memsets?

BTW if it is "contributed code", you may want original contributor to
push it, so that you don't have to do all the lindenting/cleaning/etc
yourself.

								Pavel
-- 
teflon -- maybe it is a trademark, but it should not be.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux