lkml.org 
[lkml]   [2006]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [ANN] Squashfs 3.0 released
On Út 21-03-06 19:08:21, Phillip Lougher wrote:
> Al Viro wrote:
>
> >On Tue, Mar 21, 2006 at 04:01:51PM +0000, Phillip Lougher wrote:
> >
> >
> >>Perhaps, but almost all the byteswap is performed on the metadata side,
> >>reading directories and inodes, where nearly every byte will need to be
> >>swapped. As inodes are compacted and compressed in 8 KB blocks, and are
> >>on average 15 bytes in size, for each 8 KB decompress you're potentially
> >>doing 8192/15 inode byteswaps. This is probably sufficent to affect
> >>directory search and lookup on a slow processor.
> >>
> >>
> >
> >Oh, please... Conversion from known endianness to host-endian is
> >considerably
> >faster than checking flag + branch + two variants, not to mention being
> >smaller.
> >
> >
> It's one flag check, and one set of swap code actually. The point that
> was being made is it is better to avoid byte swapping if possible.

Al is right. Unconditional swap is probably faster than
branch. Avoiding swaps is nice, but avoiding branches is probably more
important.

Can you try to benchmark it? I believe it is going to be lost in
noise, slow cpus or not.
Pavel
--
Picture of sleeping (Linux) penguin wanted...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-21 20:15    [W:0.092 / U:0.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site