[PATCH] compat/xstdint.h

2014-06-03 Thread Kinkie
Hi, this patch extracts the stdint compat to a compat/xstdint.h header, and references that from strtoll.c and Tokenizer.cc; Full farm tested, it introduces no regressions. -- Francesco === modified file 'compat/Makefile.am' --- compat/Makefile.am 2014-04-21 08:27:21 + +++

Jenkins build is back to normal : 3.HEAD-amd64-ubuntu-saucy #241

2014-06-03 Thread noc
See http://build.squid-cache.org/job/3.HEAD-amd64-ubuntu-saucy/241/changes

[PATCH] Update SBuf::trim

2014-06-03 Thread Amos Jeffries
This replaces the SBuf::trim() to use CharacterSet instead of an SBuf() list of characters and memchr() It seems to be faster for CharacterSet lookup than repeated memchr calls, but Im not certain of that. It is certainly makes simpler parser code with trim and a predefined CharacterSet than

Re: [PATCH] compat/xstdint.h

2014-06-03 Thread Amos Jeffries
On 3/06/2014 9:54 p.m., Kinkie wrote: Hi, this patch extracts the stdint compat to a compat/xstdint.h header, and references that from strtoll.c and Tokenizer.cc; Full farm tested, it introduces no regressions. This is a C++11 portabability issue. 1) When C++11 is available this new

Build failed in Jenkins: 3.HEAD-amd64-FreeBSD-10-clang #90

2014-06-03 Thread noc
See http://build.squid-cache.org/job/3.HEAD-amd64-FreeBSD-10-clang/90/changes Changes: [Amos Jeffries] Cleanup: provide Comm::ConnOpener via comm/forward.h -- [...truncated 36426 lines...] gmake[3]: Nothing to be done for `uninstall'. gmake[3]: Leaving

Re: [PATCH] Tokenizer

2014-06-03 Thread Alex Rousskov
On 06/02/2014 10:02 PM, Amos Jeffries wrote: On 3/06/2014 6:07 a.m., Alex Rousskov wrote: On 06/02/2014 11:27 AM, Kinkie wrote: +* At least one terminating delimiter is required. \0 may be passed +* as a delimiter to treat end of buffer content as the end of token. +if (tokenLen

Re: [PATCH] Update SBuf::trim

2014-06-03 Thread Alex Rousskov
On 06/03/2014 04:46 AM, Amos Jeffries wrote: This replaces the SBuf::trim() to use CharacterSet instead of an SBuf() list of characters and memchr() It seems to be faster for CharacterSet lookup than repeated memchr calls, but Im not certain of that. It is certainly makes simpler parser

Re: [PATCH] Use SBuf for tunnel.cc I/O

2014-06-03 Thread Alex Rousskov
On 06/02/2014 11:20 PM, Amos Jeffries wrote: On 3/06/2014 6:39 a.m., Alex Rousskov wrote: On 06/01/2014 02:37 AM, Amos Jeffries wrote: Lets take a step aside and cover why the buf2 is a pointer instead of an separate SBuf. I do not think those reasons are important enough in this context. It

Re: [PATCH] HTTP Parser upgrade

2014-06-03 Thread Alex Rousskov
On 06/02/2014 09:45 AM, Amos Jeffries wrote: On 21/05/2014 4:04 a.m., Alex Rousskov wrote: On 05/20/2014 05:17 AM, Amos Jeffries wrote: +explicit Parser(const Parser); // do not implement +Parser operator =(const Parser); // do not implement Why add these two? The Parser class

Re: [PATCH] Update SBuf::trim

2014-06-03 Thread Amos Jeffries
On 4/06/2014 1:08 a.m., Alex Rousskov wrote: On 06/03/2014 04:46 AM, Amos Jeffries wrote: This replaces the SBuf::trim() to use CharacterSet instead of an SBuf() list of characters and memchr() It seems to be faster for CharacterSet lookup than repeated memchr calls, but Im not certain of

[PATCH] remove cruft from libTrie

2014-06-03 Thread Kinkie
Hi, the attached patch removes some cruft from libTrie (c bindings and .cci files). No functional changes apart from that. -- Francesco # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: kin...@squid-cache.org-20140603115956-q46uuszw534vp55i # target_branch:

[code] [for discussion] map-trie

2014-06-03 Thread Kinkie
Hi all, as an experiment and to encourage some discussion I prepared an alternate implementation of TrieNode which uses a std::map instead of an array to store a node's children. The expected result is a worst case performance degradation on insert and delete from O(N) to O(N log R) where N is

Re: [PATCH] Update SBuf::trim

2014-06-03 Thread Alex Rousskov
On 06/03/2014 08:22 AM, Amos Jeffries wrote: On 4/06/2014 1:08 a.m., Alex Rousskov wrote: On 06/03/2014 04:46 AM, Amos Jeffries wrote: This replaces the SBuf::trim() to use CharacterSet instead of an SBuf() list of characters and memchr() It seems to be faster for CharacterSet lookup than

Re: [code] [for discussion] map-trie

2014-06-03 Thread Amos Jeffries
On 4/06/2014 2:40 a.m., Kinkie wrote: Hi all, as an experiment and to encourage some discussion I prepared an alternate implementation of TrieNode which uses a std::map instead of an array to store a node's children. The expected result is a worst case performance degradation on insert

Re: [code] [for discussion] map-trie

2014-06-03 Thread Kinkie
On Tue, Jun 3, 2014 at 5:52 PM, Amos Jeffries squ...@treenet.co.nz wrote: On 4/06/2014 2:40 a.m., Kinkie wrote: Hi all, as an experiment and to encourage some discussion I prepared an alternate implementation of TrieNode which uses a std::map instead of an array to store a node's children.

Re: [code] [for discussion] map-trie

2014-06-03 Thread Alex Rousskov
On 06/03/2014 08:40 AM, Kinkie wrote: Hi all, as an experiment and to encourage some discussion I prepared an alternate implementation of TrieNode which uses a std::map instead of an array to store a node's children. The expected result is a worst case performance degradation on insert