W3C home > Mailing lists > Public > ietf-http-wg@w3.org > January to March 2013

Re: Delta Compression and UTF-8 Header Values

From: Adrien W. de Croy <adrien@qbik.com>
Date: Sat, 09 Feb 2013 21:33:13 +0000
To: "Willy Tarreau" <w@1wt.eu>, "Martin Nilsson" <nilsson@opera.com>
Cc: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Message-Id: <emf3ec6632-2c7a-491d-9db4-ad235e66f19c@bombed>

------ Original Message ------
From: "Willy Tarreau" <w@1wt.eu>
>On Sat, Feb 09, 2013 at 03:12:32PM +0100, Martin Nilsson wrote:
>>  On Sat, 09 Feb 2013 14:33:41 +0100, Willy Tarreau <w@1wt.eu> wrote:
>>  >Also, processing it is
>>  >particularly inefficient as you have to parse each and every byte to 
>>  >a length, making string comparisons quite slow.
>>  You don't need to know the length in characters to compare strings. 
>>  comparing byte on byte works fine.
>This is exactly what you want to avoid when comparing with lots of 
>It's generally more efficient to first compare lengths, then byte per 
>only if lengths match.

only if you don't have to count bytes to get the length.  IF you need to 
do that, then byte-by-byte is more efficient.

I guess we're talking about length-prefixed data in this context though 
so it would be an available optimisation.


Received on Saturday, 9 February 2013 21:34:16 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 11:11:10 UTC