On 10/10/2013 11:29 PM, Xin Li wrote: > On 10/10/13 20:18, Richard Yao wrote: >> Thanks for letting us know about this. I have a few comments: > >> 1. We could eliminate a branch entirely by doing this: > >> mlen = MIN(d_end - dst, mlen); while (--mlen >= 0) *dst++ = *cpy++ > > I don't think this eliminates the branching as MIN is usually a macro > that expands to a > b ? b : a.
My mistake. I was thinking of generic swap routines. I do think that
using the MIN() macro is more readable though.
>> 2. This optimization could become a generic optimization pass in
>> the system compiler. If anyone wants to be helpful, I would
>> suggest sending this patch to the developers of both LLVM and GCC.
>
> I would ask a LLVM developers for that. If you know any GCC
> developer, it would be great to let them know as well.
I will ping them on freenode.
>> 3. Have any benchmarks been done to quantify the performance
>> improvement? That should not be required to merge this, but if any
>> benchmarks have been done, I would like to see them for my own
>> curiosity.
>
> Well to tell the truth I didn't benchmarked the code because looking
> at the assembler, the change is quite clearly an improvement (smaller
> code inside the loop and the actual working code is quite simple).
> The author did some benchmarks and claims to have 6% to 10%
> improvement over the previous version of code with various different
> types of data, but it is still interesting if someone would do a
> scientific benchmark.
I agree that it is an obvious improvement.
>> On 10/10/2013 10:39 PM, Xin Li wrote:
>>> Hi,
>>>
Received: from [140.211.166.183] (helo=smtp.gentoo.org)
by node002.open-zfs.net
with esmtp (HybridCluster distributed mail proxy)
(envelope-from <[email protected]>); Fri, 11 Oct 2013 03:39:41 -0000
>>> FYI, I think you may be interested in one of our (FreeBSD)
>>> recent change to lzjb decompression.
>>>
>>> FreeBSD r256132:
>>>
>>> Improve lzjb decompress performance by reorganizing the code to
>>> tighten the copy loop.
>>>
>>> Received: from [64.62.153.212] (helo=anubis.delphij.net) by
>>> node002.open-zfs.net with esmtp (HybridCluster distributed mail
>>> proxy) (envelope-from <[email protected]>); Fri, 11 Oct 2013
>>> 02:39:10 -0000 Submitted by: Denis Ahrens <denis h3q com>
>>>
>>> Should I file a ticket for this for tracking?
>>>
>>> Cheers,
>>>
>>>
>>>
>>> _______________________________________________ developer
>>> mailing list [email protected]
>>> http://lists.open-zfs.org/mailman/listinfo/developer
>>>
>
>
>
>
>
>
> -------------------------------------------
> illumos-zfs
> Archives: https://www.listbox.com/member/archive/182191/=now
> RSS Feed: https://www.listbox.com/member/archive/rss/182191/24010604-91e32bd2
> Modify Your Subscription:
> https://www.listbox.com/member/?member_id=24010604&id_secret=24010604-1b6b7e03
> Powered by Listbox: http://www.listbox.com
>
Received: from [140.211.166.183] (helo=smtp.gentoo.org)
by node002.open-zfs.net
with esmtp (HybridCluster distributed mail proxy)
(envelope-from <[email protected]>); Fri, 11 Oct 2013 03:39:41 -0000
signature.asc
Description: OpenPGP digital signature
_______________________________________________ developer mailing list [email protected] http://lists.open-zfs.org/mailman/listinfo/developer
