Re: Better ap_casecmpstr[n]?

2015-12-29 Thread Yann Ylavic
On Tue, Dec 29, 2015 at 3:24 PM, Jim Jagielski wrote: > ping. > > Just a reminder that right now, trunk uses ap_casecmpstr[n](), > which can make some backport requests "problematic" due to > possible merge conflicts. I've just committed (in r1722150) more reverts of abusive

Re: Better ap_casecmpstr[n]?

2015-12-29 Thread Yann Ylavic
On Tue, Dec 29, 2015 at 5:16 PM, Jim Jagielski wrote: > In a sep thread on dev@apr, OtherBill appears to be trying to > determine the "right" name for the APR impl... maube we should > wait to see what it's decided on there and we can follow > suit. OK, although we won't be

Re: Better ap_casecmpstr[n]?

2015-12-29 Thread Yann Ylavic
On Tue, Dec 29, 2015 at 5:35 PM, Jim Jagielski wrote: > >> On Dec 29, 2015, at 11:28 AM, Yann Ylavic wrote: >> >> On Tue, Dec 29, 2015 at 5:16 PM, Jim Jagielski wrote: >>> >>> PS: What determines "abusive" usage? >> >> When used to

Re: Better ap_casecmpstr[n]?

2015-12-29 Thread Jim Jagielski
In a sep thread on dev@apr, OtherBill appears to be trying to determine the "right" name for the APR impl... maube we should wait to see what it's decided on there and we can follow suit. PS: What determines "abusive" usage? > On Dec 29, 2015, at 10:56 AM, Yann Ylavic

Re: Better ap_casecmpstr[n]?

2015-12-29 Thread Jim Jagielski
> On Dec 29, 2015, at 11:28 AM, Yann Ylavic wrote: > > On Tue, Dec 29, 2015 at 5:16 PM, Jim Jagielski wrote: >> In a sep thread on dev@apr, OtherBill appears to be trying to >> determine the "right" name for the APR impl... maube we should >> wait to see

Re: Better ap_casecmpstr[n]?

2015-12-29 Thread Jim Jagielski
> On Dec 29, 2015, at 5:14 PM, William A Rowe Jr wrote: > > > Directive names, yes. Directive arguments - not as much. Yeah... that's what I said. We know our names :)

Re: Better ap_casecmpstr[n]?

2015-12-29 Thread William A Rowe Jr
On Tue, Dec 29, 2015 at 10:35 AM, Jim Jagielski wrote: > > > On Dec 29, 2015, at 11:28 AM, Yann Ylavic wrote: > > > > On Tue, Dec 29, 2015 at 5:16 PM, Jim Jagielski wrote: > >> In a sep thread on dev@apr, OtherBill appears to be trying

Re: Better ap_casecmpstr[n]?

2015-12-29 Thread Jim Jagielski
ping. Just a reminder that right now, trunk uses ap_casecmpstr[n](), which can make some backport requests "problematic" due to possible merge conflicts. Can we *please* decide what we are doing? trunk is starting to accumulate a bunch of kruft, which will make it difficult when we decide to

Re: Better ap_casecmpstr[n]?

2015-11-25 Thread Jim Jagielski
What is the current status? Is this on hold?

Re: Better ap_casecmpstr[n]?

2015-11-24 Thread William A Rowe Jr
On Tue, Nov 24, 2015 at 1:04 PM, Yann Ylavic wrote: > I tested this change with both Jim's and my versions, that's slower. > > The better implementation I have so far is: > > int ap_casecmpstr_2(const char *s1, const char *s2) > { > size_t i; > const unsigned char

Re: Better ap_casecmpstr[n]?

2015-11-24 Thread Yann Ylavic
register(s) are nicely handled by the compiler today, though locals may help it ;) Between 30% and 50% improvements (depending on the run, I'd have to do an average to be more precise), is not that negligible IMHO. On Tue, Nov 24, 2015 at 7:09 PM, Jim Jagielski wrote: > If we

Re: Better ap_casecmpstr[n]?

2015-11-24 Thread Mikhail T.
On 24.11.2015 13:04, Yann Ylavic wrote: > int ap_casecmpstr_2(const char *s1, const char *s2) > { > size_t i; > const unsigned char *ps1 = (const unsigned char *) s1; > const unsigned char *ps2 = (const unsigned char *) s2; > > for (i = 0; ; ++i) { > const int c1 = ps1[i];

Re: Better ap_casecmpstr[n]?

2015-11-24 Thread Yann Ylavic
On Tue, Nov 24, 2015 at 7:39 PM, Mikhail T. wrote: > On 24.11.2015 13:04, Yann Ylavic wrote: > > int ap_casecmpstr_2(const char *s1, const char *s2) > { > size_t i; > const unsigned char *ps1 = (const unsigned char *) s1; > const unsigned char *ps2 = (const

Better ap_casecmpstr[n]?

2015-11-24 Thread Yann Ylavic
I did some testing with different implémentations and my results show that fastest one is: int ap_casecmpstr_2(const char *s1, const char *s2) { size_t i; const unsigned char *ps1 = (const unsigned char *) s1; const unsigned char *ps2 = (const unsigned char *) s2; for (i = 0; ;

Re: Better ap_casecmpstr[n]?

2015-11-24 Thread Jim Jagielski
If we really want to squeek out optimizations, judicious use of 'register' might help even... But after awhile things start getting silly :) > On Nov 24, 2015, at 1:04 PM, Yann Ylavic wrote: > > I did some testing with different implémentations and my results show > that

Re: Better ap_casecmpstr[n]?

2015-11-24 Thread William A Rowe Jr
For the optimization cases Graham was proposing, how does this perform on your test setup? Looking for both absmatches, case mismatches and proper vs lowercase comparisons... int ap_casecmpstr_2(const char *s1, const char *s2) { size_t i; const unsigned char *ps1 = (const unsigned char *)

Re: Better ap_casecmpstr[n]?

2015-11-24 Thread Yann Ylavic
I tested this change with both Jim's and my versions, that's slower. The better implementation I have so far is: int ap_casecmpstr_2(const char *s1, const char *s2) { size_t i; const unsigned char *ps1 = (const unsigned char *) s1; const unsigned char *ps2 = (const unsigned char *)