Hello Tim,
Thank you for the review; replies inline. Note that all my performance
discussion is for amd64, with a few tests of x86, and it's all on the
machine described in my initial email (a Lynnfield Xeon), as I don't
have any other FreeBSD platform to test on. Testing and performance
meas
>
> Index: strnlen.c
> ===
> diff --git a/head/lib/libc/string/strnlen.c b/head/lib/libc/string/strnlen.c
> --- a/head/lib/libc/string/strnlen.c (revision 250951)
> +++ b/head/lib/libc/string/strnlen.c (working copy)
> @@ -1,5 +1,6
On 27 May 2013 12:20, Lee Thomas wrote:
> On 2013-05-27 04:37, Václav Zeman wrote:
>>
>> On 26 May 2013 21:01, Lee Thomas wrote:
>>>
>>> On 2013-05-26 08:00, Václav Zeman wrote:
On 05/25/2013 10:27 PM, Lee Thomas wrote:
>
>
> + lp = (const unsigned long *)((uintptr_
On 27 May 2013 12:25, Adam Nowacki wrote:
> On 2013-05-27 10:37, Václav Zeman wrote:
>>
>> On 26 May 2013 21:01, Lee Thomas wrote:
>>>
>>> On 2013-05-26 08:00, Václav Zeman wrote:
On 05/25/2013 10:27 PM, Lee Thomas wrote:
>
>
> + lp = (const unsigned long *)((uintpt
On 2013-05-27 10:37, Václav Zeman wrote:
On 26 May 2013 21:01, Lee Thomas wrote:
On 2013-05-26 08:00, Václav Zeman wrote:
On 05/25/2013 10:27 PM, Lee Thomas wrote:
+ lp = (const unsigned long *)((uintptr_t)str & ~LONGPTR_MASK);
+ va = (*lp - mask01);
+ vb = ((~*lp) & mask80
On 2013-05-27 04:37, Václav Zeman wrote:
On 26 May 2013 21:01, Lee Thomas wrote:
On 2013-05-26 08:00, Václav Zeman wrote:
On 05/25/2013 10:27 PM, Lee Thomas wrote:
+ lp = (const unsigned long *)((uintptr_t)str &
~LONGPTR_MASK);
+ va = (*lp - mask01);
+ vb = ((~*lp) & mask
Le 27/05/2013 10:37, Václav Zeman a écrit :
> On 26 May 2013 21:01, Lee Thomas wrote:
>> On 2013-05-26 08:00, Václav Zeman wrote:
>>>
>>> On 05/25/2013 10:27 PM, Lee Thomas wrote:
+ lp = (const unsigned long *)((uintptr_t)str & ~LONGPTR_MASK);
+ va = (*lp - mask01);
On 26 May 2013 21:01, Lee Thomas wrote:
> On 2013-05-26 08:00, Václav Zeman wrote:
>>
>> On 05/25/2013 10:27 PM, Lee Thomas wrote:
>>>
>>> + lp = (const unsigned long *)((uintptr_t)str & ~LONGPTR_MASK);
>>> + va = (*lp - mask01);
>>> + vb = ((~*lp) & mask80);
>>
>> I do not think
On 2013-05-26 08:00, Václav Zeman wrote:
On 05/25/2013 10:27 PM, Lee Thomas wrote:
+ lp = (const unsigned long *)((uintptr_t)str & ~LONGPTR_MASK);
+ va = (*lp - mask01);
+ vb = ((~*lp) & mask80);
I do not think that this correct C. This is type punning violating
the
rules of
On 2013-05-26 08:00, Václav Zeman wrote:
On 05/25/2013 10:27 PM, Lee Thomas wrote:
+ lp = (const unsigned long *)((uintptr_t)str & ~LONGPTR_MASK);
+ va = (*lp - mask01);
+ vb = ((~*lp) & mask80);
I do not think that this correct C. This is type punning violating
the
rules of
On 2013-05-26 08:00, Václav Zeman wrote:
On 05/25/2013 10:27 PM, Lee Thomas wrote:
+ lp = (const unsigned long *)((uintptr_t)str & ~LONGPTR_MASK);
+ va = (*lp - mask01);
+ vb = ((~*lp) & mask80);
I do not think that this correct C. This is type punning violating
the
rules of
On 05/25/2013 10:27 PM, Lee Thomas wrote:
> Hello FreeBSD devs,
>
> I have found a performance improvement to libc's strnlen().
> lib/libc/string/strnlen.c is a trivial byte-by-byte implementation,
> where strlen.c has a smarter word-by-word implementation. I have
> implemented strnlen similarly t
Hello FreeBSD devs,
I have found a performance improvement to libc's strnlen().
lib/libc/string/strnlen.c is a trivial byte-by-byte implementation,
where strlen.c has a smarter word-by-word implementation. I have
implemented strnlen similarly to strlen. It runs about 4x as fast, at
the cost o
13 matches
Mail list logo